LangChain MongoDB chat history allows cross-session data access
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- —
- Confidentiality · integrity · availability
- High · Low · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub.
Summary
The @langchain/mongodb npm package before 1.3.1 and langchainjs before 1.5.14 are affected. MongoDBChatMessageHistory does not enforce the string type of untrusted structured session identifiers, so they are interpreted as MongoDB query conditions (CWE-943). An attacker who can call chat-history operations can read, change or delete another user's conversation in a shared collection. Applications using server-controlled string identifiers are not affected.
Written with Claude Haiku 5.5 from the sources below · 2026-10-29
Description from the CNA
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| langchain-ai | langchainjs | before 1.5.14 | 1.5.14 | Patch available | CNA |
| langchain-ai | mongodb | before 1.3.1 | 1.3.1 | Patch available | CNA |
| — | @langchain/mongodb (npm) | before 1.3.1 | 1.3.1 | Patch available | GHSA-m6rx-h84q-8r95 |
- langchainjs Vendorlangchain-ai Affected before 1.5.14 Fixed in 1.5.14 Patch available CNA
- mongodb Vendorlangchain-ai Affected before 1.3.1 Fixed in 1.3.1 Patch available CNA
- @langchain/mongodb (npm) Vendor— Affected before 1.3.1 Fixed in 1.3.1 Patch available GHSA-m6rx-h84q-8r95
Remediation
Upgrade @langchain/mongodb to version 1.3.1, which fixes the issue. The sources list no fixed version for langchainjs.
Written with Claude Haiku 5.5 from the sources below · 2026-10-29
- Fix · CNA langchainjs (langchain-ai) Fixed in 1.5.14
- Fix · CNA mongodb (@langchain) Fixed in 1.3.1
- Fix · GHSA-m6rx-h84q-8r95 @langchain/mongodb (npm) Fixed in 1.3.1 Advisory →
Timeline
- 2026-10-06 Threatist record created from CVE-2026-106119
- 2026-10-07 CISA SSVC decision points changed
- 2026-10-07 Priority changed: MEDIUM → LOW
- 2026-10-08 Alias added: GHSA-m6rx-h84q-8r95
- 2026-10-08 Fix available: npm/@langchain/[email protected] · GHSA-m6rx-h84q-8r95
- 2026-10-08 CVSS score added · GHSA-m6rx-h84q-8r95
- 2026-10-08 Weakness changed · GHSA-m6rx-h84q-8r95
- 2026-10-08 6 new references · GHSA-m6rx-h84q-8r95
References
Other 5
- https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-m6rx-h84q-8r95
- https://github.com/langchain-ai/langchainjs/pull/11672
- https://github.com/langchain-ai/langchainjs/commit/946e3d856ff1f8ce7f7b9374c83f680a6ada79af
- https://github.com/langchain-ai/langchainjs/releases/tag/@langchain/[email protected]
- https://github.com/langchain-ai/langchainjs
More langchain-ai vulnerabilities
- TI-2024-31340 langchain_experimental (aka LangChain Experimental) 0.1.17 through 0.3.0 for LangChain… CVSS 3.1CRITICAL 9.8
- TI-2023-20724 An issue in langchain langchain-ai v.0.0.232 and before allows a remote attacker to… CVSS 3.1CRITICAL 9.8
- TI-2023-20706 An issue in LanChain-ai Langchain v.0.0.245 allows a remote attacker to execute arbitrary… CVSS 3.1CRITICAL 9.8
- TI-2023-20166 An issue in Harrison Chase langchain v.0.0.194 and before allows a remote attacker to… CVSS 3.1CRITICAL 9.8
- TI-2023-20136 An issue in LangChain v.0.0.231 allows a remote attacker to execute arbitrary code via the prompt parameter. CVSS 3.1CRITICAL 9.8
- TI-2023-18185 An issue in langchain v.0.0.171 allows a remote attacker to execute arbitrary code via a… CVSS 3.1CRITICAL 9.8
Sources
- CVE-2026-106119 · CVE Program
- CVE-2026-106119 · NVD
- FIRST EPSS
- GHSA-m6rx-h84q-8r95 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences