---
id: CVE-2026-106119
title: LangChain is a framework for building LLM-powered applications
summary: >-
  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 b…
severity: medium
cvss: 6
cvssVector: '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'
cwe:
  - CWE-943
vendor: langchain-ai
product: langchainjs
affected:
  - langchainjs < 1.5.14
  - mongodb < 1.3.1
published: '2026-10-06'
updated: '2026-10-06'
sourceUpdated: '2026-10-06T20:17:17.820'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-106119'
references:
  - url: >-
      https://github.com/langchain-ai/langchainjs/commit/946e3d856ff1f8ce7f7b9374c83f680a6ada79af
    label: security-advisories@github.com
  - url: 'https://github.com/langchain-ai/langchainjs/pull/11672'
    label: security-advisories@github.com
  - url: >-
      https://github.com/langchain-ai/langchainjs/releases/tag/@langchain/mongodb@1.3.1
    label: security-advisories@github.com
  - url: >-
      https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-m6rx-h84q-8r95
    label: security-advisories@github.com
tags:
  - nvd
  - cve.org
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-10-06T19:45:00.727020Z'
cvssSource: cna
ingestedAt: '2026-10-06T19:13:33.945Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
