CVE-2024-8309
CRITICAL 9.8CVSS 3.1Langchain SQL Injection vulnerability
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.
- Published
- 29 Oct 2024
- Last modified
- 9 Jul 2026
- Assigned by
- security@huntr.dev
- NVD status
- Analyzed
- Weakness
- CWE-74CWE-89
- Also known as
- GHSA-45pg-36p6-83v9PYSEC-2024-115PYSEC-2026-1507
- Sources
- NVDJSONOSV GHSA-45pg-36p6-83v9JSONOSV PYSEC-2024-115JSONOSV PYSEC-2026-1507JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N | |
| OSV | PyPA | CVSS 4.0 | CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | PyPA | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | security@huntr.dev (Secondary) | CVSS 3.0 | MEDIUM 4.9 | CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L |
| OSV | GitHub | CVSS 3.0 | MEDIUM 4.9 | CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L |
| OSV | PyPA | CVSS 3.0 | MEDIUM 4.9 | CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | langchain | langchaincpe:2.3:a:langchain:langchain:0.2.5:*:*:*:*:*:*:* |
= 0.2.5 | |
| OSV | PyPI | langchain-community | >= 0.2.0, < 0.2.19 | 0.2.19 |
| OSV | PyPI | langchain | < 0.2.0 | 0.2.0 |
| OSV | PyPI | langchain-community | >= 0.2.0, < 0.3.0 | 0.3.0 |
References
- https://github.com/langchain-ai/langchain/commit/c2a3021bb0c5f54649d380b42a0684ca5778c255 · Patch, WEB, FIX
- https://huntr.com/bounties/8f4ad910-7fdc-4089-8f0a-b5df5f32e7c5 · Exploit, Third Party Advisory, WEB, EVIDENCE
- https://nvd.nist.gov/vuln/detail/CVE-2024-8309 · ADVISORY
- https://github.com/langchain-ai/langchain/commit/64c317eba05fbac0c6a6fc5aa192bc0d7130972e · WEB
- https://github.com/langchain-ai/langchain · PACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2024-115.yaml · WEB
- https://github.com/advisories/GHSA-45pg-36p6-83v9 · ADVISORY
- https://pypi.org/project/langchain · PACKAGE
History
- 25 Nov 2026 20:56 UTC · NVD: first stored (published 29 Oct 2024)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 7 Jul 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 5 Nov 2024)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 29 Oct 2024)