{"schema":"threatline.record/2","record":{"id":"CVE-2026-106119","aliases":["GHSA-m6rx-h84q-8r95"],"summary":"LangChain: MongoDBChatMessageHistory query injection can allow cross-session access","details":"## Impact\n\n`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.\n\nApplications 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.\n\nApplications that derive the session identifier from an authenticated, server-controlled value and enforce its type are not affected by this path.\n\n## Patches\n\nThe issue is fixed in `@langchain/mongodb` version **1.3.1**.\n\nUsers of affected versions should upgrade to version 1.3.1 or later. The patched version validates session identifiers at runtime and ensures they are compared as literal values in MongoDB queries.\n\n## Workarounds\n\nIf an immediate upgrade is not possible, applications must reject session identifiers that are not non-empty strings. Session identifiers should be derived from an authenticated, server-controlled value and must not be passed directly from an untrusted request field.\n\nUpgrading remains the recommended remediation.","categories":["Databases"],"product":"@langchain/mongodb","vendor":"langchain-ai","ecosystem":"npm","affected_ranges":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-m6rx-h84q-8r95","source_modified_at":"2026-10-08T17:52:24Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"@langchain/mongodb"},"range":"<= 1.3.0"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-106119","source_modified_at":"2026-10-06T19:45:43.997Z","fetched_at":"2026-10-23T18:45:31.882637Z","product":"langchainjs","vendor":"langchain-ai","versions":[{"version":"< 1.5.14","status":"affected"}],"defaultStatus":null},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-106119","source_modified_at":"2026-10-06T19:45:43.997Z","fetched_at":"2026-10-23T18:45:31.882637Z","product":"mongodb","vendor":"@langchain","versions":[{"version":"< 1.3.1","status":"affected"}],"defaultStatus":null},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-m6rx-h84q-8r95","source_modified_at":"2026-10-08T18:00:08.902627724Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"@langchain/mongodb","purl":"pkg:npm/%40langchain/mongodb"},"ranges":[{"events":[{"introduced":"0"},{"fixed":"1.3.1"}],"type":"SEMVER"}],"versions":[]}],"fixed_versions":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-m6rx-h84q-8r95","source_modified_at":"2026-10-08T17:52:24Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"@langchain/mongodb"},"version":"1.3.1"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-m6rx-h84q-8r95","source_modified_at":"2026-10-08T18:00:08.902627724Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"@langchain/mongodb","purl":"pkg:npm/%40langchain/mongodb"},"version":"1.3.1"}],"cvss":6,"severity":"Medium","kev":{"listed":false},"epss":{"probability":0.00463,"percentile":0.39167,"score_date":"2026-10-23"},"published_at":"2026-10-06T18:01:24.262Z","modified_at":"2026-10-08T18:00:08.902627724Z","provenance":[{"source":"GitHub Advisory Database","url":"https://github.com/advisories/GHSA-m6rx-h84q-8r95","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-08T17:52:24Z"},{"source":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-106119","fetched_at":"2026-10-23T18:45:31.882637Z","source_modified_at":"2026-10-06T19:45:43.997Z"},{"source":"OSV","url":"https://osv.dev/vulnerability/GHSA-m6rx-h84q-8r95","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-08T18:00:08.902627724Z"},{"source":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-106119","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-23"}],"sources":["GitHub Advisory Database","CVE List","OSV","EPSS"],"references":[{"source":"CVE List","url":"https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-m6rx-h84q-8r95","tags":["x_refsource_CONFIRM"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-106119","source":"GitHub Advisory Database"},{"source":"CVE List","url":"https://github.com/langchain-ai/langchainjs/pull/11672","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/langchain-ai/langchainjs/commit/946e3d856ff1f8ce7f7b9374c83f680a6ada79af","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/langchain-ai/langchainjs/releases/tag/@langchain/mongodb@1.3.1","tags":["x_refsource_MISC"]},{"url":"https://github.com/advisories/GHSA-m6rx-h84q-8r95","source":"GitHub Advisory Database"}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"cve_state":"PUBLISHED","ssvc":{"exploitation":"none","automatable":"no","technical_impact":"partial","assessed_at":"2026-10-06T19:45:00.727020Z"},"classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"product","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-10-08T18:00:08.902627724Z","content_hash":"b473bf0ad9e0164f5a3b95dbce1a702fa1d1bf7c8f87ca4d5a9b7929bc022b9c"}}
