{"schemaVersion":4,"id":"CVE-2024-8309","aliases":["GHSA-45pg-36p6-83v9","PYSEC-2024-115","PYSEC-2026-1507"],"status":"published","duplicateOf":null,"title":"SQL Injection in langchain-ai/langchain","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.","dates":{"published":"2024-10-29T12:50:13.198Z","modified":"2025-10-15T12:50:40.456Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":9.8,"severity":"critical","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.0","versionLabel":"v3.0","source":"CVE.org","score":4.9,"severity":"medium","vector":"CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L","exploitability":null,"impact":null,"computed":false},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Pypi","score":2.1,"severity":"low","vector":"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","exploitability":null,"impact":null,"computed":true},{"version":"3.0","versionLabel":"v3.0","source":"OSV · Pypi","score":4.9,"severity":"medium","vector":"CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L","exploitability":3.6,"impact":5.7,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false},{"version":"3.0","versionLabel":"v3.0","source":"NVD","score":4.9,"severity":"medium","vector":"CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.13629,"percentile":0.9658,"severity":"medium","asOf":"2026-12-04T00:00:00.000Z","change":{"pp":-0.10900000000000076,"baselineDate":"2026-11-04T00:00:00.000Z","baselineScore":0.13738},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-22T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-23T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-24T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-25T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-26T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-27T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-28T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-29T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-30T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-10-31T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-01T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-02T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-03T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-04T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-05T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-06T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-07T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-08T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-09T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-10T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-11T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-12T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-13T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-14T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-15T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-16T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-17T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-18T00:00:00.000Z","score":0.13629,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.13629,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.13629,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.13629,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.13629,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.13629,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.13629,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.00637,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.00637,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.00637,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.00637,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.00637,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.00637,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.13629,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.13629,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.13629,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.13629,"percentile":0.9658}],"last30":[{"date":"2026-11-04T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-05T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-06T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-07T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-08T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-09T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-10T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-11T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-12T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-13T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-14T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-15T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-16T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-17T00:00:00.000Z","score":0.13738,"percentile":null},{"date":"2026-11-18T00:00:00.000Z","score":0.13629,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.13629,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.13629,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.13629,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.13629,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.13629,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.13629,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.00637,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.00637,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.00637,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.00637,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.00637,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.00637,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.13629,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.13629,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.13629,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.13629,"percentile":0.9658}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"REF_E6BFDB25F60BAB21","name":"Exploit Reference (huntr.com)","source":"reference","url":"https://huntr.com/bounties/8f4ad910-7fdc-4089-8f0a-b5df5f32e7c5","maturity":"unknown","reliabilityScore":0.2,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null}],"exploitCount":1,"weaknesses":[{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command","description":"The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-74","name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component","description":"The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.","type":"weakness","status":"Incomplete","abstraction":"Class","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/74.html"}],"affected":[{"vendor":"langchain-ai","product":"langchain-ai/langchain","name":"langchain-ai/langchain","label":"langchain-ai/langchain","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ unspecified, < 0.3.0","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"unspecified","startInclusive":true,"end":"0.3.0","endInclusive":false}}],"versionsText":"≥ unspecified, < 0.3.0","eol":null,"hubHref":"/vendor/langchain-ai/langchain-ailangchain"},{"vendor":"langchain","product":"langchain","name":"langchain","label":"langchain","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"0.2.5","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"exact","version":"0.2.5"}}],"versionsText":"0.2.5","eol":null,"hubHref":"/vendor/langchain/langchain"},{"vendor":"PyPI","product":"langchain","name":"langchain","label":"langchain","ecosystem":"PyPI","cpePart":null,"purl":"pkg:pypi/langchain","purlType":"pypi","versions":[{"text":"< 0.2.0","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"0.2.0","endInclusive":false}},{"text":"< c2a3021bb0c5f54649d380b42a0684ca5778c255","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"c2a3021bb0c5f54649d380b42a0684ca5778c255","endInclusive":false}}],"versionsText":"< 0.2.0 | < c2a3021bb0c5f54649d380b42a0684ca5778c255","eol":null,"hubHref":null},{"vendor":"PyPI","product":"langchain-community","name":"langchain-community","label":"langchain-community","ecosystem":"PyPI","cpePart":null,"purl":"pkg:pypi/langchain-community","purlType":"pypi","versions":[{"text":"≥ 0.2.0, < 0.2.19","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"0.2.0","startInclusive":true,"end":"0.2.19","endInclusive":false}},{"text":"≥ 0.2.0, < 0.3.0","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"0.2.0","startInclusive":true,"end":"0.3.0","endInclusive":false}}],"versionsText":"≥ 0.2.0, < 0.2.19 | ≥ 0.2.0, < 0.3.0","eol":null,"hubHref":null}],"affectedCount":4,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://huntr.com/bounties/8f4ad910-7fdc-4089-8f0a-b5df5f32e7c5","label":"huntr.com/bounties/8f4ad910-7fdc-4089-8f0a-b5df5f32e7c5","hostname":"huntr.com","tags":["WEB","EVIDENCE","Exploit","Third Party Advisory"]},{"url":"https://github.com/langchain-ai/langchain/commit/c2a3021bb0c5f54649d380b42a0684ca5778c255","label":"github.com/langchain-ai/langchain/commit/c2a3021bb0c5f54649d380b42a0684ca5778c255","hostname":"github.com","tags":["WEB","FIX","Patch"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-8309","label":"nvd.nist.gov/vuln/detail/CVE-2024-8309","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/langchain-ai/langchain/commit/64c317eba05fbac0c6a6fc5aa192bc0d7130972e","label":"github.com/langchain-ai/langchain/commit/64c317eba05fbac0c6a6fc5aa192bc0d7130972e","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/langchain-ai/langchain","label":"github.com/langchain-ai/langchain","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2024-115.yaml","label":"github.com/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2024-115.yaml","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/advisories/GHSA-45pg-36p6-83v9","label":"github.com/advisories/GHSA-45pg-36p6-83v9","hostname":"github.com","tags":["Advisory"]},{"url":"https://pypi.org/project/langchain","label":"pypi.org/project/langchain","hostname":"pypi.org","tags":["PACKAGE"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2024-10-29T12:50:13.198Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-10-15T12:50:40.456Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"priority":{"label":"routine","tag":null,"reason":"Not severe (CVSS 4.9, local access); no exploitation reported by the 5 checked sources","nextStep":"Fix in the normal cadence","rank":[0,0,0,1,14,49],"checkedSources":["cisa","enisa","circl","shadowserver","cisa-adp"],"evidence":[{"type":"epss","source":"FIRST","date":"2026-12-04T00:00:00.000Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"value":0.13629,"stale":false,"promoted":null},{"type":"cvss","source":"cve.org","date":"2025-10-15T12:50:40.456Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":4.9,"vector":"CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L","version":"3.0","headline":true},{"type":"cvss","source":"osv_pypi","date":"2025-10-15T12:50:40.456Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":2.1,"vector":"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","version":"4.0"},{"type":"cvss","source":"osv_pypi","date":"2025-10-15T12:50:40.456Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":4.9,"vector":"CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L","version":"3.0"},{"type":"cvss","source":"nvd","date":"2025-10-15T12:50:40.456Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},{"type":"cvss","source":"nvd","date":"2025-10-15T12:50:40.456Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":4.9,"vector":"CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L","version":"3.0"},{"type":"adp","source":"cisa-adp","date":"2024-10-29T13:50:16.254Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"exploitation":"poc"},{"type":"exploit","source":"reference","date":null,"status":"valid","statusDate":null,"statusSource":null,"disputes":[],"maturity":"unknown","verified":false}],"epss":{"value":0.13629,"date":"2026-12-04T00:00:00.000Z","stale":false,"promoted":null},"sources":[{"id":"cisa","lastSuccessfulSync":"2026-12-05T13:01:25.582Z","state":"fresh"},{"id":"enisa","lastSuccessfulSync":"2026-12-05T13:01:26.078Z","state":"fresh"},{"id":"circl","lastSuccessfulSync":"2026-12-05T12:01:28.919Z","state":"stale"},{"id":"shadowserver","lastSuccessfulSync":null,"state":"unavailable"},{"id":"cisa-adp","lastSuccessfulSync":"2026-12-05T13:01:07.092Z","state":"fresh"},{"id":"epss","lastSuccessfulSync":"2026-12-05T13:01:23.911Z","state":"fresh"},{"id":"osv","lastSuccessfulSync":"2026-12-05T13:01:22.884Z","state":"fresh"}],"feedEvent":null},"meta":{"dataAsOf":"2026-12-05T13:11:18.075Z","stale":false,"partial":false}}