Skip to content
Fencer Vulns
medium 4.9

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-rhel8
    affected: 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-rhel9
    not 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

Weakness
  • CWE-89 Improper Neutralization of Special Elements used in an SQL Command
  • CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component

References

Sources

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.