ZeroHour

CVE-2026-55253

MongoDB Query Operator Injection in LangGraph MongoDB Checkpoint and Store Packages

CVSS 3.1
7.7 high
EPSS
Published
()
Modified
AI analysis

LangChain's MongoDB integrations for LangGraph (langgraph-checkpoint-mongodb and langgraph-store-mongodb) fail to recursively strip keys prefixed with "$" from filter dictionaries passed to MongoDBSaver.list(), MongoDBSaver.alist(), and MongoDBStore.search(), allowing NoSQL query operator injection. An authenticated attacker who can influence a filter argument — via HTTP query parameters, request body fields, or agent tool arguments — can inject MongoDB Query Language operators such as $regex or $where to bypass intended equality filters. In multi-tenant deployments where the filter enforces per-user or per-tenant isolation, this lets the attacker read other tenants' checkpoint or store data, which can include conversation state, memory, and other sensitive agent data. Applications that build filters entirely from trusted server-side values are at lower practical risk. The flaw is fixed in langgraph-checkpoint-mongodb 0.3.0 and langgraph-store-mongodb 0.4.0, and no public proof of concept or in-the-wild exploitation is known.

What to do: Upgrade to langgraph-checkpoint-mongodb 0.3.0 or later and langgraph-store-mongodb 0.4.0 or later. Audit your application for code paths where user-controlled input (HTTP query parameters, request bodies, or agent tool arguments) reaches a list(), alist(), or search() filter, especially where the filter implements tenant or user isolation. Until patched, recursively reject keys beginning with "$" in any filter built from untrusted input, and re-check stored data for cross-tenant access if multi-tenant filters were user-influenced.

Affected
LangChain langgraph-checkpoint-mongodb< 0.3.0
LangChain langgraph-store-mongodb< 0.4.0
Estimated exposure
unknown (likely thousands of self-hosted LangGraph deployments at most) — No published install counts or internet-scan data exist for these PyPI packages, and affected instances are application-embedded libraries in self-hosted LangGraph services rather than directly enumerable internet-facing systems.

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

LangChain MongoDB provides integrations between MongoDB, Atlas, LangChain, and LangGraph. Prior to langgraph-checkpoint-mongodb 0.3.0 and langgraph-store-mongodb 0.4.0, MongoDBSaver.list(), MongoDBSaver.alist(), and MongoDBStore.search() incorporate filter dictionaries into MongoDB queries without recursively rejecting keys prefixed with $. An authenticated caller who controls a filter argument through HTTP query parameters, request body fields, or agent tool arguments can inject MongoDB Query Language operators such as $regex or $where. In a multi-tenant deployment that uses the filter to enforce per-user or per-tenant isolation, injected operators can bypass intended equality filtering and expose other tenants' checkpoint or store data. Filters constructed entirely from trusted server-side values have lower practical risk. This issue is fixed in langgraph-checkpoint-mongodb 0.3.0 and langgraph-store-mongodb 0.4.0.

Weakness
CWE-943
Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N

In the news

No ingested article mentions this CVE yet.