Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @langchain/mongodb
  4. ›
  5. CVE-2026-106119

CVE-2026-106119: LangChain: MongoDBChatMessageHistory query injection can allow cross-session access

October 8, 2026

MongoDBChatMessageHistory did not enforce the documented string type for session identifiers at runtime. In affected applications, a structured session identifier could be interpreted as a MongoDB query condition rather than as a literal identifier.

Applications are affected when they pass untrusted session identifier input to MongoDBChatMessageHistory and store multiple users’ histories in the same collection. An attacker who can invoke chat-history operations may be able to read, modify, or delete another user’s stored conversation.

Applications that derive the session identifier from an authenticated, server-controlled value and enforce its type are not affected by this path.

References

  • github.com/advisories/GHSA-m6rx-h84q-8r95
  • github.com/langchain-ai/langchainjs/commit/946e3d856ff1f8ce7f7b9374c83f680a6ada79af
  • github.com/langchain-ai/langchainjs/pull/11672
  • github.com/langchain-ai/langchainjs/releases/tag/@langchain/mongodb@1.3.1
  • github.com/langchain-ai/langchainjs/security/advisories/GHSA-m6rx-h84q-8r95
  • nvd.nist.gov/vuln/detail/CVE-2026-106119

Code Behaviors & Features

Detect and mitigate CVE-2026-106119 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 1.3.1

Fixed versions

  • 1.3.1

Solution

Upgrade to version 1.3.1 or above.

Impact 7.1 HIGH

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-943: Improper Neutralization of Special Elements in Data Query Logic

Source file

npm/@langchain/mongodb/CVE-2026-106119.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Fri, 13 Nov 2026 12:15:39 +0000.