Every CVE Search/ Get API key

CVE-2026-48121

@langchain/langgraph-checkpoint-mongodb: NoSQL parameter injection in MongoDBSaver allows cross-tenant state access

6.7 MediumPublic exploitFix available

@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.

Attack profile

How easy it is to exploit

Attack vector
Adjacent network
Complexity
Low
Privileges needed
Low
User interaction
Required

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
None

Exploit likelihood

0.31%Up 0.3 points since Jun 12, 2026
90%50%10%1%

What each source reports

CVE List Score used 6.7

@langchain/langgraph-checkpoint-mongodb: NoSQL parameter injection in MongoDBSaver allows cross-tenant state access

@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.

Record
CVE-2026-48121
CVSS 3.1
6.7 MediumCVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N
Weakness
CWE-943
Updated
2026-11-02
EUVDEUVD-2026-52793 6.7

@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.

Record
EUVD-2026-52793
CVSS 3.1
6.7 MediumCVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N
Updated
2026-11-02
GitHub AdvisoriesGHSA-98xf-r82g-9mhx 6.7

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

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

Record
GHSA-98xf-r82g-9mhx
CVSS 3.1
6.7 MediumCVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N
Weakness
CWE-943
Updated
2026-11-02
NVD 6.7

@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.

Record
CVE-2026-48121
CVSS 3.1
6.7 MediumCVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N
Weakness
CWE-943
Updated
2026-11-02
OSV 6.7

@langchain/langgraph-checkpoint-mongodb: NoSQL parameter injection in MongoDBSaver allows cross-tenant state access

@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.

Record
CVE-2026-48121
CVSS 3.1
6.7 MediumCVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N
Weakness
CWE-943
Updated
2026-11-02
OSVGHSA-98xf-r82g-9mhx 6.7

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

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

Record
GHSA-98xf-r82g-9mhx
CVSS 3.1
6.7 MediumCVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N
Weakness
CWE-943
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
@langchain/langgraph-checkpoint-mongodb
npm
through 1.3.0
1.3.1
@langchain/langgraph-checkpoint-mongodb
npm
before 1.3.1
1.3.1

Public exploits

Links only. Every CVE stores no exploit code.

Public exploits
SourceLinkDate
PoC in GitHubdecker757/cs440-langgraph-nosql-demo2026-09-30

History

History
RecordedChangedSources
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV, PoC in GitHub

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-48121 is a medium vulnerability (CVSS 6.7) in Langchain-ai Langgraphjs, published June 12, 2026. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 0.31%, the 24th percentile. Fixed in @langchain/langgraph-checkpoint-mongodb 1.3.1.

References

MoveEnter Open