{"id":"CVE-2025-8709","published":"2025-10-26T05:38:55Z","modified":"2025-10-28T14:32:39Z","title":"SQL Injection in langchain-ai/langchain","vendor":"langchain-ai","product":"langchain-ai/langchain","tier":"tail","description":{"text":"A SQL injection vulnerability exists in the langchain-ai/langchain repository, specifically in the LangGraph's SQLite store implementation. The affected version is langgraph-checkpoint-sqlite 2.0.10. The vulnerability arises from improper handling of filter operators ($eq, $ne, $gt, $lt, $gte, $lte) where direct string concatenation is used without proper parameterization. This allows attackers to inject arbitrary SQL, leading to unauthorized access to all documents, data exfiltration of sensitive fields such as passwords and API keys, and a complete bypass of application-level security filters.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.3,"severity":"HIGH","version":"3.0","vector":"CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00225,"percentile":0.13274,"provenance":"source"},"cwes":[{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command"}],"references":[{"url":"https://huntr.com/bounties/9793f4b3-76f8-44a4-989f-49a2177ee118","tags":[]}],"priority":{"score":7.8,"factors":[{"name":"EPSS percentile","points":2.65},{"name":"CVSS severity","points":5.11}]},"vendorSlug":"langchain-ai","affectedVersions":[{"vendor":"langchain-ai","product":"langchain-ai/langchain","versions":[">= unspecified, <= latest"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-10-28T14:32:35.114025Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"langgraph-checkpoint-sqlite","vulnerableRanges":["<2.0.11"],"patched":["2.0.11"],"from":["GHSA-4h97-wpxp-3757","PYSEC-2026-1528"],"provenance":"source"}],"summary":{"text":"The flaw is a SQL injection in the SQLite store implementation of LangGraph within the langchain-ai/langchain repository, specifically in langgraph-checkpoint-sqlite version 2.0.10, where filter operators ($eq, $ne, $gt, $lt, $gte, $lte) are concatenated into SQL strings without parameterization. An attacker with local access and low privileges, requiring no user interaction, can inject arbitrary SQL to read unauthorised documents, exfiltrate sensitive fields such as passwords and API keys, and bypass application-level security filters.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:12:08Z"},"euvd":{"id":"EUVD-2025-35939","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-langchain-ai-langgraph-cve-2025-8709","children":[{"from":"CVE-2025-8709","to":"CVE-2025-67644","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["libs/checkpoint-sqlite/langgraph/store/sqlite/base.py"],"commits":["https://github.com/langchain-ai/langgraph/commit/297242913f8ad2143ee3e2f72e67db0911d48e2a","https://github.com/langchain-ai/langgraph/commit/bc9d45b476101e441cb1cc602dea03eb29232de4"],"basis":"shared function","functions":["_decode_ns_text","_prepare_batch_search_queries"]}]},{"from":"CVE-2025-8709","to":"CVE-2026-71433","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["libs/checkpoint-sqlite/langgraph/store/sqlite/base.py"],"commits":["https://github.com/langchain-ai/langgraph/commit/bc9d45b476101e441cb1cc602dea03eb29232de4","https://github.com/langchain-ai/langgraph/commit/66ebe1a0da921e73f0f9f879ba105d314c079f7c"],"basis":"shared function","functions":["_get_batch_list_namespaces_queries","_prepare_batch_search_queries"]}]}]}}