Read the docs

LangChain MongoDB chat history allows cross-session data access

Priority LOW 27CWE-943Published · Updated

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

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00463 40th percentileScored 2026-11-07
Fix Fixed langchainjs (langchain-ai): 1.5.14mongodb (@langchain): 1.3.1+1 more product

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

VendorProductAffected versionsFixed inStatusSource
langchain-ailangchainjsbefore 1.5.141.5.14Patch availableCNA
langchain-aimongodbbefore 1.3.11.3.1Patch availableCNA
—@langchain/mongodb (npm)before 1.3.11.3.1Patch availableGHSA-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

  1. 2026-10-06 Threatist record created from CVE-2026-106119
  2. 2026-10-07 CISA SSVC decision points changed
  3. 2026-10-07 Priority changed: MEDIUM → LOW
  4. 2026-10-08 Alias added: GHSA-m6rx-h84q-8r95
  5. 2026-10-08 Fix available: npm/@langchain/[email protected] · GHSA-m6rx-h84q-8r95
  6. 2026-10-08 CVSS score added · GHSA-m6rx-h84q-8r95
  7. 2026-10-08 Weakness changed · GHSA-m6rx-h84q-8r95
  8. 2026-10-08 6 new references · GHSA-m6rx-h84q-8r95

References

  • 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
See all 75 →

Sources