CVE-2026-48121 @langchain/langgraph-checkpoint-mongodb: NoSQL parameter injection in MongoDBSaver allows cross-tenant state access
Attackers can inject NoSQL operators into checkpoint identifiers to bypass thread scoping and leak cross-tenant state data.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-48121?
CVE-2026-48121 is a medium-severity SQL injection vulnerability in langchain-ai langgraphjs, published on 4 Aug 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
@langchain/langgraph-checkpoint-mongodb provides a LangGraph.js CheckpointSaver implementation that uses MongoDB for storage. Versions 1.3.0 and below are vulnerable to NoSQL injection: checkpoint identifiers (thread_id, checkpoint_ns, checkpoint_id) from config.configurable are passed into MongoDB find() queries in MongoDBSaver.getTuple() without type enforcement. If an attacker supplies an object payload (such as MongoDB operators $gt or $ne) instead of a string, it can be interpreted as a query operator, bypassing thread scoping and leaking checkpoints, including pending writes, across tenants. Applications are at risk if they forward untrusted input into config.configurable without coercing it to strings or validating it against a schema, particularly in multi-tenant or user-isolated setups. Apps that only use server-issued, string-typed identifiers with schema validation rejecting non-string fields are not affected. This issue has been fixed in version 1.3.1.
Weakness: CWE-943
Which versions are affected by CVE-2026-48121?
2 open source packages ship an affected version, including @langchain/langgraph-checkpoint-mongodb.
| Package | Affected | Fixed in |
|---|---|---|
@langchain/langgraph-checkpoint-mongodb npm | All versions | 1.3.1 |
@langchain/langgraph-checkpoint-mongodb npm | All versions | 1.3.1 |
How do I fix CVE-2026-48121?
Upgrade @langchain/langgraph-checkpoint-mongodb to 1.3.1 or later.
Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.
Is CVE-2026-48121 being exploited?
There is no known exploitation of CVE-2026-48121 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Sources
Also known as GHSA-98xf-r82g-9mhx.