AAK-MCP-LANGGRAPH-MONGO-CVE-2026-48121-001: LangGraph MongoDB checkpoint saver NoSQL injection leaks checkpoints across tenants (below 1.3.1)
- Severity
- MEDIUM
- Category
- Supply Chain (
supply-chain) - Scanner
agent_audit_kit/scanners/mcp_cve_pins_2026_07.py- Auto-fixable
- No.
- SARIF name
LangGraphMongoCheckpointNosqlInjection
What it detects
@langchain/langgraph-checkpoint-mongodb (the LangGraph.js MongoDB CheckpointSaver) at 1.3.0 and below passes checkpoint identifiers (thread_id, checkpoint_ns, checkpoint_id) from config.configurable into MongoDB find() queries in MongoDBSaver.getTuple() without type enforcement. An attacker who supplies an object payload (e.g. the MongoDB operators $gt / $ne) instead of a string has it interpreted as a query operator, bypassing thread scoping and leaking checkpoints, including pending writes, across tenants (CVE-2026-48121, CVSS 6.7). Fixed in 1.3.1; treat <= 1.3.0 (and unpinned) as exposed.
How to fix
Upgrade @langchain/langgraph-checkpoint-mongodb to >= 1.3.1 and pin it. Coerce checkpoint identifiers from config.configurable to strings before they reach a MongoDB query, so an object payload can never be read as an operator.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-MCP-LANGGRAPH-MONGO-CVE-2026-48121-001
Limitations
Reads @langchain/langgraph-checkpoint-mongodb, langgraph-checkpoint-mongodb and langgraph-store-mongodb, each against its own fix floor, in requirements*.txt at any depth and, at the project root only, in pyproject.toml, Pipfile, package.json, .mcp.json, mcp.json, claude_desktop_config.json and the Pipfile.lock, poetry.lock, uv.lock, package-lock.json, pnpm-lock.yaml and yarn.lock lockfiles, taking the lowest version a range allows and reporting a reference that states no version. The dependency is not read when it is declared in a sub-directory manifest (services/api/pyproject.toml) or in a lockfile format the reader does not parse (pdm.lock). A file over 2 MB, or a lockfile over 32 MiB, is not read. A declaration nested more than 64 levels deep in package.json, a TOML manifest or an MCP config (an MCP server more than 62) is still judged, and reported without a line; a lockfile entry keeps its line at any depth.
References
- CVE: CVE-2026-48121, CVE-2026-55253
- OWASP Agentic Top 10: ASI03 (Identity and Privilege Abuse), ASI04 (Agentic Supply Chain Vulnerabilities)
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-SUPPLY-01 (Runtime Package Fetch)
- CSA AI Controls Matrix (AICM): STA-08, AIS-07, DSP-04
All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-LANGGRAPH-MONGO-CVE-2026-48121-001.md: the page then shows that text, with the registry reference appended under it.