{"id":"CVE-2024-8309","published":"2024-10-29T12:50:13Z","modified":"2025-10-15T12:50:40Z","title":"SQL Injection in langchain-ai/langchain","vendor":"langchain-ai","product":"langchain-ai/langchain","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.9,"severity":"MEDIUM","version":"3.0","vector":"CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.13629,"percentile":0.96564,"provenance":"source"},"cwes":[{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command"}],"references":[{"url":"https://huntr.com/bounties/8f4ad910-7fdc-4089-8f0a-b5df5f32e7c5","tags":[]},{"url":"https://github.com/langchain-ai/langchain/commit/c2a3021bb0c5f54649d380b42a0684ca5778c255","tags":[]}],"priority":{"score":27.7,"factors":[{"name":"EPSS percentile","points":19.31},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":3.43}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2024-09-28","earliestUrl":"https://github.com/liadlevy/CVE-2024-8309","repos":[{"name":"liadlevy/CVE-2024-8309","url":"https://github.com/liadlevy/CVE-2024-8309","stars":3,"created":"2024-09-28"}]},"first":{"date":"2024-09-28","source":"PoC-in-GitHub","url":"https://github.com/liadlevy/CVE-2024-8309"},"provenance":"source"},"vendorSlug":"langchain-ai","affectedVersions":[{"vendor":"langchain-ai","product":"langchain-ai/langchain","versions":[">= unspecified, < 0.3.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2024-10-29T13:50:16.254824Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"langchain-community","vulnerableRanges":[">=0.2.0, <0.2.19"],"patched":["0.2.19"],"from":["GHSA-45pg-36p6-83v9"],"provenance":"source"},{"ecosystem":"PyPI","package":"langchain","vulnerableRanges":["<0.2.0"],"patched":["0.2.0"],"from":["GHSA-45pg-36p6-83v9","PYSEC-2026-1507"],"provenance":"source"}],"summary":{"text":"A flaw in the GraphCypherQAChain class of the langchain-ai/langchain product allows SQL injection through prompt injection. An attacker who can supply crafted prompts to the chain can reach its query path.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T04:19:46Z"},"euvd":{"id":"EUVD-2024-0089","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2024-5998","published":"2024-09-17","fixed":"0.2.4","kev":false},{"cve":"CVE-2024-2965","published":"2024-06-06","fixed":"0.2.5","kev":false},{"cve":"CVE-2024-3095","published":"2024-06-06","fixed":"0.2.9","kev":false,"link":{"from":"CVE-2024-3095","to":"CVE-2024-8309","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:langchain-community","fromFixed":"0.2.9","toFixed":"0.2.19","daysApart":145}]}},{"cve":"CVE-2024-8309","published":"2024-10-29","fixed":"0.2.19","kev":false},{"cve":"CVE-2025-6984","published":"2025-09-04","fixed":"0.3.27","kev":false}],"package":"PyPI:langchain-community"}}