CVE-2024-7042
Published: 29 October 2024
Summary
CVE-2024-7042 is a critical-severity SQL Injection (CWE-89) vulnerability in Langchain Langchain. Its CVSS base score is 9.8 (Critical).
Operationally, exploitation aligns with the MITRE ATT&CK technique Exploit Public-Facing Application (T1190); ranked at the 19.6th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.
This vulnerability is AI-related — categorised as AI Agent Protocols and Integrations; in the LLM/Generative AI Risks risk domain; MITRE ATLAS techniques in scope: Direct (AML.T0051.000), Hardware (AML.T0010.000), Financial Harm (AML.T0048.000).
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2024-0088
Vulnerability details
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,…
more
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.
- CWE(s)
AI Security AnalysisAI
- AI Category
- AI Agent Protocols and Integrations
- Risk Domain
- LLM/Generative AI Risks
- OWASP Top 10 for LLMs 2025
- None mapped
- Classification Reason
- The vulnerability is in GraphCypherQAChain of langchain-ai/langchainjs, a LangChain component for integrating LLMs with graph databases (e.g., Neo4j via Cypher queries generated from natural language prompts). LangChain is a framework for building AI agents and LLM chains with tool integrations, fitting 'AI Agent Protocols and Integrations'. Prompt injection is a core AI/LLM risk confirmed by the AI/ML bug bounty context.
Related Threats
MITRE ATT&CK Enterprise TechniquesAI
Why these techniques?
Prompt injection vulnerability enables exploitation of public-facing applications (T1190) via arbitrary Cypher queries for database data collection (T1213.006), stored data manipulation including create/update/delete (T1565.001), and data destruction for DoS (T1485).
MITRE ATLAS TechniquesAI
MITRE ATLAS techniques
Affected Assets
Mitigating Controls
Likely Mitigating Controls AI
Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.