CVE-2026-106119

LangChain: MongoDBChatMessageHistory query injection can allow cross-session access

State
Published
Severity
6.0 Medium
Published
Oct 6, 2026
Updated
Oct 6, 2026
Reserved
Oct 6, 2026

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
4.06.0 MediumCVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:NGitHub_M

Weaknesses

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

Affected Products

ProductVersions
langchainjslangchain-ai
  • < 1.5.14Affected
mongodb@langchain
  • < 1.3.1Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.