Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
MEDIUM severity

GHSA-98xf-r82g-9mhx

MEDIUMFix: langchain-ai/langgraphjs#2397

GHSA-98xf-r82g-9mhx is a medium-severity (CVSS 6.7) CWE-943 vulnerability in @langchain/langgraph-checkpoint-mongodb. O3 Security confirms whether GHSA-98xf-r82g-9mhx is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

LangGraph has NoSQL parameter injection in MongoDBSaver, allowing cross-tenant state access

Also known asCVE-2026-48121
Published
Jun 12, 2026
Updated
Jun 12, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Aug 20, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • A successful exploit gives an attacker total control of the affected component, not partial access.
  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for GHSA-98xf-r82g-9mhx.

EPSS Exploitation Probability

via FIRST.org ↗
0.2%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs14th percentile — riskier than 14% of all scored CVEsHighest risk

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

How urgent is this, really

GHSA-98xf-r82g-9mhx plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.

Where this sits among everything scored

Of 370,894 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

6other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
@langchain/langgraph-checkpoint-mongodbnpm
87Kdownloads / week

Description

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-mongodb with multi-tenant or user-isolated thread models.
  • Accept user-controlled values for thread_id, checkpoint_ns, or checkpoint_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_id from trusted URL params that remain strings.
  • Enforce schema validation that rejects non-string identifier fields.

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.

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

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npm@langchain/langgraph-checkpoint-mongodball versions1.3.1

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @langchain/langgraph-checkpoint-mongodb. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update @langchain/langgraph-checkpoint-mongodb to 1.3.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-98xf-r82g-9mhx is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-98xf-r82g-9mhx is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-98xf-r82g-9mhx. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

## 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`
O3 Security · Impact-Aware SCA

Is GHSA-98xf-r82g-9mhx in your dependencies?

O3 detects GHSA-98xf-r82g-9mhx across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.

GHSA-98xf-r82g-9mhx: @langchain/langgraph… | O3 Security