Read the docs
TI-2024-06529 Aliases CVE-2024-7042GHSA-6m59-8fmv-m5f9

Prompt Injection in langchain-ai/langchainjs Leading to SQL Injection

Priority HIGH 75CWE-89Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
SQL injection
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-89.

Summary

A vulnerability in the GraphCypherQAChain class of langchain-ai/langchainjs versions 0.2.5 and all versions with this class allows for prompt injection, leading to SQL injection. This vulnerability permits unauthorized data manipulation, data exfiltration, denial of service (DoS) by deleting all data, breaches in multi-tenant security environments, and data integrity issues. Attackers can create, update, or delete nodes and relationships without proper authorization, extract sensitive data, disrupt services, access data across different tenants, and compromise the integrity of the database.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00311 24th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed langchain-ai/langchainjs (langchain-ai): 0.3.1@langchain/community (npm): 0.3.3

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
langchain-ailangchain-ai/langchainjsbefore 0.3.10.3.1Patch availableCNA
—@langchain/community (npm)before 0.3.30.3.3Patch availableGHSA-6m59-8fmv-m5f9
  • langchain-ai/langchainjs Vendorlangchain-ai Affected before 0.3.1 Fixed in 0.3.1 Patch available CNA
  • @langchain/community (npm) Vendor— Affected before 0.3.3 Fixed in 0.3.3 Patch available GHSA-6m59-8fmv-m5f9

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:langchain:langchain:*:*:*:*:*:*:*:*before 0.3.1Vulnerablelangchain-ai
  • cpe:2.3:a:langchain:langchain:*:*:*:*:*:*:*:* Versions before 0.3.1 Vulnerable ·langchain-ai

Remediation

  • Fix · CNA langchain-ai/langchainjs (langchain-ai) Fixed in 0.3.1
  • Fix · GHSA-6m59-8fmv-m5f9 @langchain/community (npm) Fixed in 0.3.3 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2024-7042
  2. 2026-10-03 Alias added: GHSA-6m59-8fmv-m5f9

References

  • TI-2023-20724 An issue in langchain langchain-ai v.0.0.232 and before allows a remote attacker to… CVSS 3.1CRITICAL 9.8
  • TI-2023-20706 An issue in LanChain-ai Langchain v.0.0.245 allows a remote attacker to execute arbitrary… CVSS 3.1CRITICAL 9.8
  • TI-2023-20166 An issue in Harrison Chase langchain v.0.0.194 and before allows a remote attacker to… CVSS 3.1CRITICAL 9.8
  • TI-2023-20136 An issue in LangChain v.0.0.231 allows a remote attacker to execute arbitrary code via the prompt parameter. CVSS 3.1CRITICAL 9.8
  • TI-2023-18185 An issue in langchain v.0.0.171 allows a remote attacker to execute arbitrary code via a… CVSS 3.1CRITICAL 9.8
  • TI-2023-18176 An issue in LangChain before 0.0.236 allows an attacker to execute arbitrary code because… CVSS 3.1CRITICAL 9.8
See all 27 →

Sources