Skip to main content

CVE-2026-106119: CWE-943: Improper Neutralization of Special Elements in Data Query Logic in langchain-ai langchainjs

0
Medium
VulnerabilityCVE-2026-106119cvecve-2026-106119cwe-943
Published: 10/06/2026 (10/06/2026, 18:01:24 UTC)
Source: CVE Database V5
Vendor/Project: langchain-ai
Product: langchainjs

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.

CVSS v4.0

Score 6.0medium

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vuln. Confidentiality
High
Vuln. Integrity
Low
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

langchain-ai

langchainjs

Affected versions
<1.5.14

@langchain

mongodb

Affected versions
<1.3.1

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/06/2026, 18:33:42 UTC

Technical Analysis

LangChain's langchainjs framework versions prior to 1.3.1 contain an improper neutralization of special elements in data query logic (CWE-943) within the MongoDBChatMessageHistory component. The vulnerability arises because the session identifier, which should be a string, is not enforced at runtime, allowing it to be interpreted as a MongoDB query condition. This enables an attacker with the ability to invoke chat-history operations to read, modify, or delete other users' stored conversations in a shared MongoDB collection. The flaw is resolved in version 1.3.1 by enforcing the string type for the session identifier.

Potential Impact

An attacker able to invoke chat-history operations can exploit this vulnerability to read, modify, or delete another user's stored conversation data in a shared MongoDB collection. This could lead to unauthorized data access and data integrity issues. Applications that use authenticated, server-controlled string identifiers are not vulnerable to this issue.

Mitigation Recommendations

Upgrade langchainjs to version 1.3.1 or later, where this vulnerability is fixed by enforcing the string type for the session identifier. Applications using authenticated, server-controlled string identifiers are not affected and require no additional action.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-10-06T15:33:55.333Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6ac53b952cdf04f656d07132

Added to database: 10/06/2026, 18:19:01 UTC

Last enriched: 10/06/2026, 18:33:42 UTC

Last updated: 10/06/2026, 20:04:26 UTC

Views: 13

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses