{"id":"CVE-2026-106119","published":"2026-10-06T18:01:24Z","modified":"2026-10-06T19:45:43Z","title":"LangChain: MongoDBChatMessageHistory query injection can allow cross-session access","vendor":"langchain-ai","product":"langchainjs","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6,"severity":"MEDIUM","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00483,"percentile":0.34301,"provenance":"source"},"cwes":[{"id":"CWE-943","name":"Improper Neutralization of Special Elements in Data Query Logic"}],"references":[{"url":"https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-m6rx-h84q-8r95","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/langchain-ai/langchainjs/pull/11672","tags":["x_refsource_MISC"]},{"url":"https://github.com/langchain-ai/langchainjs/commit/946e3d856ff1f8ce7f7b9374c83f680a6ada79af","tags":["x_refsource_MISC"]},{"url":"https://github.com/langchain-ai/langchainjs/releases/tag/@langchain/mongodb@1.3.1","tags":["x_refsource_MISC"]}],"priority":{"score":11.1,"factors":[{"name":"EPSS percentile","points":6.86},{"name":"CVSS severity","points":4.2}]},"vendorSlug":"langchain-ai","affectedVersions":[{"vendor":"langchain-ai","product":"langchainjs","versions":["< 1.5.14"]},{"vendor":"@langchain","product":"mongodb","versions":["< 1.3.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-10-06T19:45:00.727020Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"@langchain/mongodb","vulnerableRanges":["<1.3.1"],"patched":["1.3.1"],"from":["GHSA-m6rx-h84q-8r95"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-93771","exploited":false,"provenance":"source"}}