CVE-2025-67644: LangGraph SQLite Checkpoint is vulnerable to SQL Injection via metadata filter key in checkpointer list method

Published Dec 10, 2025
·
Updated

Context

A SQL injection vulnerability exists in LangGraph's SQLite checkpoint implementation that allows attackers to manipulate SQL queries through metadata filter keys. This affects applications that accept untrusted metadata filter keys (not just filter values) in checkpoint search operations.

Impact

Attackers who control metadata filter keys can execute arbitrary sql queries against the database.

Root Cause

The metadatapredicate() function constructs SQL queries by interpolating filter keys directly into f-strings without validation:

python VULNERABLE CODE (before fix) for querykey, queryvalue in metadatafilter.items(): operator, paramvalue = wherevalue(queryvalue) predicates.append( f"jsonextract(CAST(metadata AS TEXT), '$.{querykey}') {operator}" ) paramvalues.append(paramvalue)

While filter values are parameterized, filter keys are not validated, allowing SQL injection.

Attack Example

Before Fix: python from langgraph.checkpoint.sqlite import SqliteSaver

saver = SqliteSaver.fromconnstring("checkpoints.db")

Attacker controls the filter keys maliciousfilter = {"x') OR '1'='1": "dummy"}

Returns ALL checkpoints, bypassing filtering results = list(saver.list(None, filter=maliciousfilter))

Resulting SQL: sql WHERE jsonextract(CAST(metadata AS TEXT), '$.x') OR '1'='1') = ? -- Injected condition makes WHERE clause always true

Who Is Affected?

LangSmith Deployment Customers: NOT Impacted

LangSmith deployment customers are NOT affected by this vulnerability. LangSmith deployments do not allow configuring custom checkpointers, so the vulnerable code path cannot be reached.

High Risk: Custom Server Deployments

You are affected if your application: - Runs a custom server with SqliteSaver checkpointer - Exposes an endpoint for fetching checkpoint history (e.g., via getstatehistory()) - Accepts metadata filter keys from untrusted sources

Example vulnerable code: python Custom server endpoint - User controls filter key names - DANGEROUS @app.post("/api/history") def gethistory(request): filterfield = request.json.get("filterfield") # Untrusted input filtervalue = request.json.get("filtervalue")

# VULNERABLE: Attacker can bypass access controls history = list(graph.getstatehistory( config, filter={filterfield: filtervalue} )) return history

Note on privilege escalation: If an endpoint allows end users to specify arbitrary filter keys, those users likely already have legitimate access to query the checkpoint database. In such cases, this vulnerability may not constitute a privilege escalation, as users who can control filter keys would typically already be expected to have database access. However, the SQL injection still allows bypassing intended filtering logic and metadata-based access controls that the application may rely on for data isolation.

Additional Security Hardening (Defense in Depth)

This release also includes hardening improvements:

1. Checkpoint Limit Parameter: used f-string interpolation into parameterized query. Not considered a vulnerability as it requires users to accept untrusted input and not validate it against the actual API signature.

2. Store Filter Value Parameterization: Refactored all filter value handling from manual quote escaping to parameterized queries

Remediation

Immediate Actions

1. Update to the patched version of langgraph-checkpoint-sqlite 2. Audit your code for locations where filter keys come from untrusted sources

Other sources

LangGraph SQLite Checkpoint is an implementation of LangGraph CheckpointSaver that uses SQLite DB (both sync and async, via aiosqlite). Versions 3.0.0 and below are vulnerable to SQL injection through the checkpoint implementation. Checkpoint allows attackers to manipulate SQL queries through metadata filter keys, affecting applications that accept untrusted metadata filter keys (not just filter values) in checkpoint search operations. The metadatapredicate() function constructs SQL queries by interpolating filter keys directly into f-strings without validation. This issue is fixed in version 3.0.1.

MITRE

Affected Software

2 affected componentsFixes available
pip/langgraph-checkpoint-sqlite<3.0.1
3.0.1
Langchain Langgraph-checkpoint-sqlite Python<3.0.1

Event History

Dec 10, 2025
Advisory Published
via GitHub·12:02 AM
Data Sourced
via GitHub·12:02 AM
DescriptionSeverityWeaknessAffected Software
CVE Published
via MITRE·11:37 PM
Data Sourced
via MITRE·11:37 PM
DescriptionSeverityWeakness
Dec 11, 2025
Data Sourced
via NVD·12:16 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·12:16 AM
RemedyAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-67644?

CVE-2025-67644 is classified as a critical severity SQL injection vulnerability.

2

How do I fix CVE-2025-67644?

To fix CVE-2025-67644, upgrade LangGraph's SQLite checkpoint implementation to version 3.0.1 or later.

3

What systems are affected by CVE-2025-67644?

CVE-2025-67644 affects applications that utilize untrusted metadata filter keys in LangGraph's SQLite checkpoint implementation.

4

Can CVE-2025-67644 lead to data breaches?

Yes, if exploited, CVE-2025-67644 could allow attackers to manipulate SQL queries, potentially leading to data breaches.

5

Is CVE-2025-67644 a zero-day vulnerability?

CVE-2025-67644 is not classified as a zero-day vulnerability as the issue has been identified and a fix is available.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203