Langchain SQL Injection vulnerability
CVE-2024-8309 · GHSA-45pg-36p6-83v9 · published 2024-10-29 · updated 2024-11-12
- Severity
- Low
- CVSS score
- 4.9
- Chance of exploitation (EPSS)
- 13.6%
- Fixed in
- 0.2.0
- Exploitation Public proof of concept
- Automatable No
- Technical impact Partial
- CISA SSVC
A vulnerability in the GraphCypherQAChain class of langchain-ai/langchain version 0.2.5 allows for SQL injection through prompt injection. This vulnerability can lead to 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.
Upgrade langchain to 0.2.0 or later, and langchain-community to 0.2.19 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| langchain | PyPI | < 0.2.0 | 0.2.0 |
| langchain-community | PyPI | >= 0.2.0, < 0.2.19 | 0.2.19 |
- CriticalUnauthenticated Remote Code Execution in Langflow via Public Flow Build EndpointlangflowExploited
- CriticalRay is vulnerable to Critical RCE via Safari & Firefox Browsers through DNS Rebinding AttackrayExploited
- CriticalLangflow Unauth RCElangflow, langflow-baseExploited
- HighLiteLLM: Authenticated command execution via MCP stdio test endpointslitellmExploited
- CriticalMLflow vulnerable to remote code execution on unauthenticated servers via third-party scorer deserialization importing caller-placed artifacmlflow
- CriticalAgno: Arbitrary code execution via `eval()` on `field_type` in `FunctionCall`agno
- CriticalLangchain SQL Injection vulnerabilitylangchain
- CriticalLangchain vulnerable to arbitrary code execution via the evaluate function in the numexpr librarylangchain
- Criticallangchain vulnerable to arbitrary code executionlangchain
- CriticalLangChain vulnerable to arbitrary code executionlangchain
- CriticalLangChain vulnerable to arbitrary code executionlangchain
- CriticalLangChain vulnerable to arbitrary code executionlangchain
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.