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

- **Severity:** Medium 6.7 (`CVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N`)
- **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:** Yes
- **Published:** 4 Aug 2026
- **Updated:** 4 Aug 2026
- **Also known as:** GHSA-98xf-r82g-9mhx

## 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 (Improper Neutralization of Special Elements in Data Query Logic)

## Which versions are affected by CVE-2026-48121?

2 open source packages ship an affected version, including @langchain/langgraph-checkpoint-mongodb.


| Package | Ecosystem | 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.

## 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:

- Local classroom demo of NoSQL operator injection in LangGraph's MongoDBSaver (GHSA-98xf-r82g-9mhx / CVE-2026-48121). Fictional data only. (github_poc): https://github.com/decker757/cs440-langgraph-nosql-demo

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-48121 and fix it if it is affected.

What it is: 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.
Exploitation: There is no known exploitation of CVE-2026-48121 in the wild and no public exploit code.

Affected packages and fixed versions:
- @langchain/langgraph-checkpoint-mongodb (npm): affected all versions; fixed in 1.3.1
- @langchain/langgraph-checkpoint-mongodb (npm): affected all versions; fixed in 1.3.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-48121/ (Markdown: https://insights.sbomify.com/CVE-2026-48121/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-48121
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-48121
- OSV: https://osv.dev/vulnerability/CVE-2026-48121

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-48121/
Summaries are generated and may contain mistakes; the official description above is the record.
