Summary
A NoSQL injection vulnerability existed in MongoDBSaver where checkpoint identifier fields from config.configurable were used in MongoDB queries without strict type enforcement. In vulnerable versions, attacker-controlled object payloads (for example MongoDB operators like $gt and $ne) could be interpreted as query operators instead of literal identifier values.
This could bypass intended thread scoping and return checkpoints from other tenants.
Attack surface
The vulnerable path was in MongoDBSaver.getTuple(), where thread_id, checkpoint_ns, and checkpoint_id were used in MongoDB find() queries. The same unvalidated values were then reused to fetch pending writes.
Applications were exposed when untrusted input was forwarded into config.configurable (for example, directly from request bodies or query parameters) without string coercion or schema validation.
Who is affected?
Applications are vulnerable if they:
- Use
@langchain/langgraph-checkpoint-mongodbwith multi-tenant or user-isolated thread models. - Accept user-controlled values for
thread_id,checkpoint_ns, orcheckpoint_id. - Pass those values into
app.invoke(),app.stream(), or direct saver methods without validation.
Applications are generally not vulnerable if they:
- Use server-issued identifiers only.
- Source
thread_idfrom trusted URL params that remain strings. - Enforce schema validation that rejects non-string identifier fields.
Exploit example
An attacker-controlled request can inject MongoDB operators:
graph = new StateGraph(...)
.compile({
checkpointer: new MongoDBSaver()
});
graph.invoke(..., {
configurable: {
"thread_id": { "$gt": "" },
"checkpoint_ns": { "$ne": null }
}
});
If this payload is forwarded into config.configurable, the resulting query may match checkpoints outside the intended tenant/thread scope.
Security hardening changes
Version 1.3.1 hardens @langchain/langgraph-checkpoint-mongodb by adding runtime validation for configurable checkpoint identifiers and rejecting invalid values before MongoDB query/write paths execute.
The patch also includes regression tests covering object/operator payloads across affected methods.
Migration guide
Upgrade to @langchain/[email protected] or later.
No API migration is required for valid callers. However, applications that currently pass non-string identifier values in config.configurable will now receive explicit errors and should normalize/validate inputs.
As defense in depth, validate identifier fields at API boundaries and avoid passing raw client objects into graph config.
Resources
Impact
An attacker with control over configurable checkpoint identifiers could read checkpoint data outside their authorized thread boundary.
Potentially exposed data includes:
- Checkpoint state
- Metadata
- Pending writes
This is a confidentiality issue with cross-tenant data disclosure risk.
CVE-2026-48121 has a CVSS score of 6.7 (Medium). The vector is reachable from an adjacent network, low privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.3.1); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2026-48121? CVE-2026-48121 is a medium-severity security vulnerability in @langchain/langgraph-checkpoint-mongodb (npm), affecting versions <= 1.3.0. It is fixed in 1.3.1.
- How severe is CVE-2026-48121? CVE-2026-48121 has a CVSS score of 6.7 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of @langchain/langgraph-checkpoint-mongodb are affected by CVE-2026-48121? @langchain/langgraph-checkpoint-mongodb (npm) versions <= 1.3.0 is affected.
- Is there a fix for CVE-2026-48121? Yes. CVE-2026-48121 is fixed in 1.3.1. Upgrade to this version or later.
- Is CVE-2026-48121 exploitable, and should I be worried? Whether CVE-2026-48121 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-48121 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-48121? Upgrade
@langchain/langgraph-checkpoint-mongodbto 1.3.1 or later.