CVE-2024-7042
Prompt Injection in langchain-ai/langchainjs Leading to SQL Injection
- State
- Published
- Severity
- 4.9 Medium
- Published
- Oct 29, 2024
- Updated
- Oct 15, 2025
- Reserved
- Jul 23, 2024
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.
Scores
| CVSS | Score | Vector | Source |
|---|---|---|---|
| 3.0 | 4.9 Medium | CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L | @huntr_ai |
Weaknesses
- CWE-89 Improper Neutralization of Special Elements used in an SQL Command
Affected Products
| Product | Versions |
|---|---|
langchain-ai/langchainjslangchain-ai |
|
References
Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.