CriticalVulnerabilityLLM-specific
CVE-2024-8309: langchain GraphCypherQAChain SQL injection through prompt injection
- Source
- NVD(opens in a new tab)
- Identifier
- CVE-2024-8309
- Published
- Record updated
- Affected
- langchain < 0.2.0, fixed in 0.2.0, released May 17, 2024, 165 days before disclosure
- langchain-community >= 0.2.0, < 0.2.19, fixed in 0.2.19, released November 12, 2024, 14 days after disclosure
- Known exploitation
- Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
- EPSS
- 13.7%
Summary
CVE-2024-8309 affects the GraphCypherQAChain class of langchain-ai/langchain version 0.2.5. Attackers can use prompt injection to trigger SQL injection, allowing them to create, update, or delete nodes and relationships without authorization, extract sensitive data, and disrupt service. The flaw can also reach data across tenants in multi-tenant environments and compromise database integrity.
Mitigation
The source does not state a fix yet. Check the original advisory for updates.
Affected packages in the Exposure Registry
Matched by package name and ecosystem. Each entry shows whether the package delegates to a language model and how many tracked packages depend on it.
- langchainPyPILLM dependency since 2022-10-25 · 31 tracked dependents
- langchain-communityPyPILLM dependency since 2023-12-08 · 27 tracked dependents
Related items
- MediumGHSA-8prr-f582-jqq3: LangGraph CLI prints the registry push token in `langgraph deploy --verbose` outputSame vendor · GitHub Advisory Database
- HighGHSA-4hm6-w6qq-w73v: LangGraph JavaScript custom authentication may permit cross-user Store accessSame vendor · GitHub Advisory Database
- MediumGHSA-3fx2-cqw9-xr3c: LangGraph: Unencoded identifiers in LangGraph SDK v3 streaming can redirect authenticated GET requestsSame vendor · GitHub Advisory Database
- MediumGHSA-6hmw-9432-67qq: LangGraph: Namespace labels containing `.` reach other namespaces in Postgres and SQLite storesSame vendor · GitHub Advisory Database
- MediumCVE-2026-108575: BerriAI LiteLLM improper authorization in secret resolution via api_keySame vendor · NVD/CVE Database