CVE-2025-8709: langgraph-checkpoint-sqlite: SQL Injection exposes database
GHSA-4h97-wpxp-3757 HIGH CISA: TRACK*If your team uses LangGraph with SQLite checkpointing (langgraph-checkpoint-sqlite ≤2.0.10), upgrade to 2.0.11 immediately — the filter operators are vulnerable to SQL injection that can expose every API key, credential, and document in your checkpoint store. Assume any application-layer query filtering that reaches LangGraph's SQLite store is a potential injection point, audit what sensitive data your agents are persisting in state, and rotate any credentials that may have passed through the checkpoint store. This is a straightforward patch with no architectural changes required.
What is the risk?
High severity (CVSS 7.3) with low current exploitation probability (EPSS 0.00036, not in KEV). The local attack vector (AV:L) limits direct remote exploitation, but many LangGraph-based applications expose filter parameters via API endpoints, effectively widening the attack surface to any network-accessible query interface. The Changed Scope (S:C) and High Confidentiality impact (C:H) are the critical factors: a successful exploit bypasses all application-level access controls and potentially exposes the entire checkpoint store. Organizations running LangGraph in multi-tenant or SaaS contexts face the highest risk.
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| LangGraph | pip | <= 2.0.10 | 2.0.11 |
Do you use LangGraph? You're affected.
How severe is it?
What is the attack surface?
What should I do?
6 steps-
PATCH
Upgrade langgraph-checkpoint-sqlite to ≥2.0.11 immediately. Verify: pip show langgraph-checkpoint-sqlite | grep Version.
-
AUDIT
Inventory all services using the vulnerable version — scan requirements.txt, pyproject.toml, and lock files across your AI stack.
-
ROTATE
Treat any API keys, tokens, or credentials ever stored in LangGraph SQLite checkpoints as potentially compromised; rotate them proactively.
-
HARDEN
Never store raw credentials in agent state or checkpoints; reference secrets via vault integrations (e.g., AWS Secrets Manager, HashiCorp Vault).
-
DETECT
Review application logs for filter queries containing SQL metacharacters (single quotes, semicolons, UNION, OR 1=1 patterns) against LangGraph endpoints.
-
WORKAROUND (if patching is blocked): Validate and allowlist filter operator values at the application layer before they reach LangGraph store methods.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2025-8709?
If your team uses LangGraph with SQLite checkpointing (langgraph-checkpoint-sqlite ≤2.0.10), upgrade to 2.0.11 immediately — the filter operators are vulnerable to SQL injection that can expose every API key, credential, and document in your checkpoint store. Assume any application-layer query filtering that reaches LangGraph's SQLite store is a potential injection point, audit what sensitive data your agents are persisting in state, and rotate any credentials that may have passed through the checkpoint store. This is a straightforward patch with no architectural changes required.
Is CVE-2025-8709 actively exploited?
No confirmed active exploitation of CVE-2025-8709 has been reported, but organizations should still patch proactively.
How to fix CVE-2025-8709?
1. PATCH: Upgrade langgraph-checkpoint-sqlite to ≥2.0.11 immediately. Verify: pip show langgraph-checkpoint-sqlite | grep Version. 2. AUDIT: Inventory all services using the vulnerable version — scan requirements.txt, pyproject.toml, and lock files across your AI stack. 3. ROTATE: Treat any API keys, tokens, or credentials ever stored in LangGraph SQLite checkpoints as potentially compromised; rotate them proactively. 4. HARDEN: Never store raw credentials in agent state or checkpoints; reference secrets via vault integrations (e.g., AWS Secrets Manager, HashiCorp Vault). 5. DETECT: Review application logs for filter queries containing SQL metacharacters (single quotes, semicolons, UNION, OR 1=1 patterns) against LangGraph endpoints. 6. WORKAROUND (if patching is blocked): Validate and allowlist filter operator values at the application layer before they reach LangGraph store methods.
What systems are affected by CVE-2025-8709?
This vulnerability affects the following AI/ML architecture patterns: agent frameworks, RAG pipelines, multi-agent orchestration, stateful AI workflows.
What is the CVSS score for CVE-2025-8709?
CVE-2025-8709 has a CVSS v3.1 base score of 7.3 (HIGH). The EPSS exploitation probability is 0.15%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0025 Exfiltration via Cyber Means AML.T0049 Exploit Public-Facing Application AML.T0055 Unsecured Credentials AML.T0083 Credentials from AI Agent Configuration AML.T0106 Exploitation for Credential Access Compliance Controls Affected
What are the technical details?
Original Advisory
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.
Exploitation Scenario
An attacker identifies an application built on LangGraph that exposes a checkpoint retrieval endpoint accepting metadata filter parameters (e.g., GET /api/history?filter[$eq]=value). Instead of a legitimate value, they inject a SQL payload such as ' OR '1'='1' --. The unparameterized string concatenation in the SQLite store executes the query returning all checkpoint records, defeating user-scoped isolation entirely. For targeted credential exfiltration, the attacker chains UNION SELECT statements to extract specific fields — API keys, session tokens, or passwords stored by the agent during prior tool calls — then exfiltrates them out of band. The attacker then uses harvested API keys to pivot into integrated services (LLM providers, databases, SaaS tools) the agent had access to, achieving lateral movement beyond the original LangGraph deployment.
Weaknesses (CWE)
CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Primary
CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') CWE-89 — Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'): 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.
- [Architecture and Design] Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482]. For example, consider using persistence layers such as Hibernate or Enterprise Java Beans, which can provide significant protection against SQL injection if used properly.
- [Architecture and Design] If available, use structured mechanisms that automatically enforce the separation between data and code. These mechanisms may be able to provide the relevant quoting, encoding, and validation automatically, instead of relying on the developer to provide this capability at every point where output is generated. Process SQL queries using prepared statements, parameterized queries, or stored procedures. These features should accept parameters or variables and support strong typing. Do not dynamically construct and execute query strings within these features using "exec" or similar functionality, since this may re-introduce the possibility of SQL injection. [REF-867]
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N References
- github.com/advisories/GHSA-4h97-wpxp-3757
- github.com/langchain-ai/langgraph/commit/bc9d45b476101e441cb1cc602dea03eb29232de4
- github.com/langchain-ai/langgraph/pull/5666
- github.com/langchain-ai/langgraph/releases/tag/checkpointsqlite%3D%3D2.0.11
- nvd.nist.gov/vuln/detail/CVE-2025-8709
- huntr.com/bounties/9793f4b3-76f8-44a4-989f-49a2177ee118
Timeline
Related Vulnerabilities
CVE-2025-67644 7.3 langgraph-checkpoint-sqlite: SQL Injection exposes database
Same package: langgraph CVE-2025-64104 7.3 langgraph-checkpoint-sqlite: SQL Injection exposes database
Same package: langgraph CVE-2026-28277 6.8 langgraph: Deserialization enables RCE
Same package: langgraph CVE-2026-48775 6.8 LangGraph SQLite: deserialization RCE at checkpoint load
Same package: langgraph CVE-2026-48121 6.7 LangGraph MongoDB: NoSQL injection leaks tenant checkpoints
Same package: langgraph