{"id":"CVE-2026-106119","state":"PUBLISHED","title":"LangChain: MongoDBChatMessageHistory query injection can allow cross-session access","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.","publishedAt":"2026-10-06T18:01:24.262Z","updatedAt":"2026-10-06T19:45:43.997Z","severity":{"score":6,"label":"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","source":"GitHub_M"},"assigner":"GitHub_M","products":["langchain-ai langchainjs","@langchain mongodb"],"affected":[{"vendor":"langchain-ai","product":"langchainjs","versions":[{"version":"< 1.5.14","status":"affected"}]},{"vendor":"@langchain","product":"mongodb","versions":[{"version":"< 1.3.1","status":"affected"}]}],"references":["https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-m6rx-h84q-8r95","https://github.com/langchain-ai/langchainjs/pull/11672","https://github.com/langchain-ai/langchainjs/commit/946e3d856ff1f8ce7f7b9374c83f680a6ada79af","https://github.com/langchain-ai/langchainjs/releases/tag/@langchain/mongodb@1.3.1"],"weaknesses":["CWE-943"],"ingestedAt":"2026-10-29T20:10:23.711Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/106xxx/CVE-2026-106119.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-106119","state":"PUBLISHED","datePublished":"2026-10-06T18:01:24.262Z","dateUpdated":"2026-10-06T19:45:43.997Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-10-06T15:33:55.333Z"},"containers":{"cna":{"title":"LangChain: MongoDBChatMessageHistory query injection can allow cross-session access","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"langchain-ai","product":"langchainjs","versions":[{"version":"< 1.5.14","status":"affected"}]},{"vendor":"@langchain","product":"mongodb","versions":[{"version":"< 1.3.1","status":"affected"}]}],"references":[{"url":"https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-m6rx-h84q-8r95","name":"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","name":"https://github.com/langchain-ai/langchainjs/pull/11672","tags":["x_refsource_MISC"]},{"url":"https://github.com/langchain-ai/langchainjs/commit/946e3d856ff1f8ce7f7b9374c83f680a6ada79af","name":"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","name":"https://github.com/langchain-ai/langchainjs/releases/tag/@langchain/mongodb@1.3.1","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"PRESENT","privilegesRequired":"LOW","userInteraction":"NONE","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"LOW","vulnAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","baseScore":6,"baseSeverity":"MEDIUM","vectorString":"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","version":"4.0"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-943","lang":"en","description":"CWE-943: Improper Neutralization of Special Elements in Data Query Logic","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-10-06T18:01:24.262Z"},"source":{"advisory":"GHSA-m6rx-h84q-8r95","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-10-06T19:45:00.727020Z","id":"CVE-2026-106119","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-06T19:45:43.997Z"}}]}}}