Listen to this Post
The CVE-2024-XXXX vulnerability in LangGraph’s `checkpoint-sqlite` store stems from unsafe string concatenation when constructing JSON path queries for SQLite. In the file base.py, the `filter_conditions` appends a SQL fragment where the user-supplied `key` is directly concatenated into the string for the `json_extract` function. While the `value` is escaped for single quotes, the `key` is not sanitized or parameterized. This allows an attacker to craft a malicious key that closes the `json_extract` path and appends arbitrary SQL conditions. For example, a key like `access’) = ‘public’ OR ‘1’=’1′ OR json_extract(value, ‘$.` can be injected, bypassing intended query logic. This enables unauthorized data access, potentially leaking all records in the database table, as the injected OR condition always evaluates to true.
Platform: LangGraph
Version: checkpoint-sqlite
Vulnerability: SQL Injection
Severity: Critical
date: 2024-XX-XX
Prediction: Patch within 2 weeks
What Undercode Say:
`cat base.py | grep -A 5 “json_extract(value”`
`python3 sqlite_poc.py`
`sqlite3 memory.db “SELECT FROM checkpoints WHERE …”`
How Exploit:
Craft malicious filter keys.
Inject SQL via key parameter.
Bypass access controls.
Protection from this CVE:
Use parameterized queries.
Sanitize all user inputs.
Apply strict input allowlisting.
Impact:
Unauthorized data access.
Complete database compromise.
Bypass of security controls.
🎯Let’s Practice Exploiting & Learn Patching For Free:
Sources:
Reported By: github.com
Extra Source Hub:
Undercode

