CVE-2026-106119
published medium CVSS 4.0 · 6.0LangChain: MongoDBChatMessageHistory query injection can allow cross-session access
Package status and fixes
Description
LangChain is a framework for building LLM-powered applications. Prior to 1.3.1, MongoDBChatMessageHistory does not enforce the documented string type for an untrusted structured session identifier at runtime, allowing the identifier to be interpreted as a MongoDB query condition rather than as a literal value when multiple users' histories are stored in a shared MongoDB collection. An attacker able to invoke chat-history operations can read, modify, or delete another user's stored conversation. Applications using authenticated, server-controlled string identifiers are not affected. This issue is fixed in version 1.3.1.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 6.0 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| langchain-ai | langchainjs | < 1.5.14 (affected) | GitHub_M · cna |
| @langchain | mongodb | < 1.3.1 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-943 CWE-943: Improper Neutralization of Special Elements in Data Query Logic
References
4- https://github.com/langchain-ai/langchainjs/commit/946e3d856ff1f8ce7f7b9374c83f680a6ada79af
- https://github.com/langchain-ai/langchainjs/pull/11672
- https://github.com/langchain-ai/langchainjs/releases/tag/@langchain/[email protected]
- https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-m6rx-h84q-8r95
Provider assertions
2GitHub_M · cna
LangChain: MongoDBChatMessageHistory query injection can allow cross-session access
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 44d94d8dc32e15835375d9edd2ea385ca329e7ae2adb5aeb3a386d9faf19aa9e
- Ingested
- 06 Oct 2026, 20:16:55 UTC
- Source record
- Official CVE record