CVE-2024-8309 json
SQL Injection in langchain-ai/langchain
published 2024-10-29 2 y ago modified 2026-07-09 4 mo ago also GHSA-45pg-36p6-83v9 , PYSEC-2024-115 , PYSEC-2026-1507 , EUVD-2024-0089
- cvss
- 4.9
- version 3.0, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 13.7%
- EPSS 13.7% chance of exploitation in 30 days, percentile 96%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi langchain-community 0.2.19
- pypi langchain 0.2.0
- langchain-ai langchain-ai/langchain 0.3.0
- langchain-ai langchain 0.3.0
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2024-8309 updated cvss 4.9
langchain: SQL Injection in langchain-ai/langchain
-
Red Hat Ansible Automation Platform 2 ansible-automation-platform-24/ee-dellemc-openmanage-rhel8, ansible-automation-platform-24/platform-resource-runner-rhel8affected: no fix available “Fix deferred”
-
Red Hat OpenShift Lightspeed lightspeed-service-api-rhel9 Red Hat Ansible Automation Platform 2 aap-cloud-metrics-collector-container, ansible-automation-platform-25/ee-minimal-rhel8, ansible-automation-platform-25/lightspeed-rhel8, ansible-automation-platform-24/de-supported-rhel8, ansible-automation-platform-25/ansible-dev-tools-rhel8 Red Hat Enterprise Linux AI (RHEL AI) bootc-nvidia-rhel9not affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
13.74% chance of exploitation in the next 30 days, higher than 96% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- huntr.com https://huntr.com/bounties/8f4ad910-7fdc-4089-8f0a-b5df5f32e7c5 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.0 | 4.9 | CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L |
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 3.0 | 4.9 | CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L |
| OSV | 3.0 | 4.9 | CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | langchain-community | >=0.2.0, <0.2.19 |
0.2.19 |
| pypi | langchain | <0.2.0 |
0.2.0 |
Affected products
- langchain-ai langchain-ai/langchain
- langchain-ai langchain
Classification
References
-
github.com
/langchain-ai/langchain/commit/c2a3021bb0c5f54649d380b42a0684ca5778c255
web, patch
-
github.com
/langchain-ai/langchain/commit/64c317eba05fbac0c6a6fc5aa192bc0d7130972e
web
-
huntr.com
/bounties/8f4ad910-7fdc-4089-8f0a-b5df5f32e7c5
web, exploit, third-party-advisory, evidence
-
nvd.nist.gov
/vuln/detail/CVE-2024-8309
advisory
-
github.com
/langchain-ai/langchain
package
-
github.com
/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2024-115.yaml
web
-
github.com
/advisories/GHSA-45pg-36p6-83v9
advisory
-
pypi.org
/project/langchain
package
Sources
- CVE List CVE-2024-8309
- GitHub Advisory GHSA-45pg-36p6-83v9
- NVD CVE-2024-8309
- OSV PYSEC-2024-115
- OSV PYSEC-2026-1507
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.