CVE-2024-7042: Prompt Injection in langchain-ai/langchainjs Leading to SQL Injection
Vulnerability summary
CVE-2024-7042 is a critical (CVSS 9.8) vulnerability in langchain-ai langchain-ai/langchainjs. EPSS estimates a 0.31% chance of exploitation in the next 30 days, higher than 25.8% of scored vulnerabilities. 1 public exploit is recorded.
Not severe (CVSS 4.9, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 0 · Related 2Timeline
- 29-10-2024PublishedVulnerability first disclosed.
- 15-10-2025Last modifiedVulnerability information updated.
Description
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.
CVSS metrics
5 scores · 3 sources · 3 versions- OSV · NpmEcosystem advisory · calculated4.9MediumCVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
- NVDNIST4.9MediumCVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
EPSS trend
Probability
0.31%
Chance of exploitation in the next 30 days
Percentile
26%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.31% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
1 foundExploit Reference (huntr.com)
Maturity: unknown
Weaknesses
CWE · root causeAffected systems
Known conditions: local access, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
@langchain1 product
- community< 0.3.3
Langchain1 product
- langchain< 0.3.1
Langchain-ai1 product
- langchain-ai/langchainjs≥ unspecified, < 0.3.1
3 vendors · 3 products