GitHub Security Advisory: GHSA-g48c-2wqr-h844
Package: langgraph (PIP)
Severity: MODERATE (CVSS 6.8)
CWE: CWE-502: Deserialization of Untrusted Data
Vulnerable versions: <= 1.0.9
Patched in: 1.0.10

Summary: LangGraph checkpoint loading has unsafe msgpack deserialization

Details:
LangGraph checkpointers can load msgpack-encoded checkpoints that reconstruct Python objects during deserialization. If an attacker can modify checkpoint data in the backing store (for example, after a database compromise or other privileged write access to the persistence layer), they can potentially supply a crafted payload that triggers unsafe object reconstruction when the checkpoint is loaded.

This is a **post-exploitation / defense-in-depth** issue. Exploitation requires the ability to write attacker-controlled checkpoint bytes at rest. In most deployments that prerequisite already implies a serious incident; the additional risk is turning “checkpoint-store write access” into code execution in the application runtime, which can expand blast radius (for example by exposing environment variables or cloud credentials available to the runtime).

There is no evidence of exploitation in the wild, and LangGraph is not aware of a practical exploitation path in existing deployments today. This change is intended to reduce the blast radius of a checkpoint-store compromise.

## Affected users / systems

Users may be affected if they:

- use a persistent checkpointer (database, remote store, shared filesystem, etc.),
- load/resume from checkpoints, and
- operate in an environment where an attacker could gain privileged write access to checkpoint data in the backing store.

This issue requires the attacker to be able to modify persisted checkpoint bytes (or to compromise a trusted component that writes them). It is generally not reachable by an unauthenticated remote attacker in a correctly configured deployment.

## Impact
- Potential **arbitrary code execution** or other unsafe side effects during checkpoint deserialization.
- Escalation from “write access to checkpoint store” to “code execution in the application runtime,” which may expose runtime secrets or provide access to other systems the runtime can reach.

## Exploitation scenario (high level)
1. Attacker gains privileged write access to the checkpoint store (for example, via database compromise, leaked credentials, or abuse of an administrative data path).
2. Attacker writes a crafted checkpoint payload containing msgpack data intended to reconstruct dangerous objects.
3. Application resumes and deserializes the checkpoint; unsafe reconstruction could execute attacker-controlled behavior.

## Mitigation / remediation
LangGraph provides an allowlist-based hardening mechanism for msgpack checkpoint deserialization.

### Strict mode (environment variable)
- **`LANGGRAPH_STRICT_MSGPACK`**
  - When set truthy (`1`, `true`, `yes`), the default msgpack deserialization policy becomes strict.
  - Concretely: `JsonPlusSerializer()` will default `allowed_msgpack_modules` to `None` (strict) instead of `True` (warn-and-allow), unless `allowed_msgpack_modules=...` is explicitly passed.

### `allowed_msgpack_modules` (serializer/checkpointer config)
This setting controls what msgpack “ext” types are allowe