SQL Injection in langchain-ai/langchain
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.
Problem Types
| Type | CWE ID | Description |
|---|
| CWE | CWE-89 | CWE-89 Improper Neutralization of Special Elements used in an SQL Command |
Type: CWE
Description: CWE-89 Improper Neutralization of Special Elements used in an SQL Command
Metrics
| Version | Base score | Base severity | Vector |
|---|
| 3.0 | 7.3 | HIGH | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N |
Version: 3.0
Base score: 7.3
Base severity: HIGH
Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N