CVE-2024-7042
JavaScript vulnerability analysis and mitigation

Overview

A critical vulnerability (CVE-2024-7042) was discovered in the GraphCypherQAChain class of langchain-ai/langchainjs versions 0.2.5 and all versions containing this class. The vulnerability allows for prompt injection that can lead to SQL injection attacks. This security issue was disclosed on October 29, 2024, and affects the LangChain JavaScript implementation (NVD).

Technical details

The vulnerability exists in the GraphCypherQAChain class implementation and enables prompt injection attacks that can escalate to SQL injection. The severity of this vulnerability is rated as CRITICAL with a CVSS v3.1 base score of 9.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H), indicating the highest level of severity with complete impact on confidentiality, integrity, and availability (NVD).

Impact

The vulnerability's impact is severe, allowing attackers to perform unauthorized data manipulation, data exfiltration, and execute denial of service (DoS) attacks by deleting all data. Additionally, it can lead to breaches in multi-tenant security environments and compromise data integrity. Attackers can create, update, or delete nodes and relationships without proper authorization, extract sensitive data, disrupt services, and access data across different tenants (NVD).

Mitigation and workarounds

A patch has been released to address this vulnerability. Users should update their langchain-ai/langchainjs installations to a version that includes the security fix (GitHub Patch).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-59041HIGH8.7
  • JavaScriptJavaScript
  • @anthropic-ai/claude-code
NoYesSep 10, 2025
CVE-2025-58764HIGH8.7
  • JavaScriptJavaScript
  • @anthropic-ai/claude-code
NoYesSep 10, 2025
CVE-2025-59049HIGH7.5
  • JavaScriptJavaScript
  • @mockoon/commons-server
NoYesSep 10, 2025
CVE-2025-59052HIGH7.1
  • JavaScriptJavaScript
  • @nguniversal/common
NoYesSep 10, 2025
CVE-2025-57520LOW2.1
  • JavaScriptJavaScript
  • decap-cms
NoNoSep 10, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management