@langchain/community SQL Injection vulnerability
Low4.9CVE-2024-7042 · Published Oct 29, 2024 · updated Aug 7, 2026
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.
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| @langchain/community npm | < 0.3.3 | 0.3.3 |
Details and references
- CVSS 3.0
- CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-89
- Also known as
- CVE-2024-7042
More LangChain advisories
All LangChain| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Oct 292024 | Langchain SQL Injection vulnerability | Low4.9 | 0.2.0+1 more |
| Oct 292024 | Langchain Path Traversal vulnerability | Medium6.5 | 0.2.19 |
| Sep 192024 | LangChain Experimental Eval Injection vulnerability | Critical9.8 | No fix yet |
| Sep 172024 | LangChain pickle deserialization of untrusted data | High5.2 | 0.2.4 |
| Jul 152024 | langchain-experimental vulnerable to Arbitrary Code Execution | Critical8.5 | 0.0.21 |
| Jun 162024 | langchain_experimental Code Execution via Python REPL access | High7.8 | 0.0.61 |