Vulnerability · Published Oct 29, 2024 · Assigned by @huntr_ai
CVE-2024-8309SQL Injection in langchain-ai/langchain
Medium 4.9
In plain English
A medium-severity SQL injection in langchain-ai/langchain from langchain-ai. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 13.7% (higher than 97% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | langchain | 0.2.0 | GHSA-45pg-36p6-83v9 |
| PyPI | langchain | 0.2.0 | PYSEC-2024-115 |
| PyPI | langchain | 0.2.0 | PYSEC-2026-1507 |
| PyPI | langchain-community | 0.2.19 | GHSA-45pg-36p6-83v9 |
| PyPI | langchain-community | 0.3.0 | PYSEC-2024-115 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| langchain-ai | langchain-ai/langchain | unspecified – before 0.3.0 |
Weakness: CWE-89 · Vector: CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L