Skip to content
Heist/ feed
Medium

LangChain: MongoDBChatMessageHistory query injection can allow cross-session access

Type: advisorySource: Official CVE List1 source record

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.

Announced Group revision 1
Original source ↗

CVE-2026-106119

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2026-106119

langchainjs

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

mongodb

Source reference: /containers/cna/affected/1/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "vendor": "langchain-ai",
    "product": "langchainjs",
    "versions": [
      {
        "status": "affected",
        "version": "< 1.5.14"
      }
    ]
  },
  {
    "vendor": "@langchain",
    "product": "mongodb",
    "versions": [
      {
        "status": "affected",
        "version": "< 1.3.1"
      }
    ]
  }
]
Related CVEs
CVE-2026-106119

Source reference: /cveMetadata/cveId

Publisher severity

medium

Source reference: /containers/cna/metrics

Event
#9555 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement