UTC
High

LangChain vulnerable to unsafe deserialization of attacker-controlled objects through overly broad `load()` allowlists

CVE-2026-44843 · GHSA-pjwx-r37v-7724 · published 2026-05-08 · updated 2026-06-08

Severity
High
CVSS score
8.2
Chance of exploitation (EPSS)
0.41%
Fixed in
1.3.3
  • Exploitation No known exploitation
  • Automatable Yes
  • Technical impact Partial
  • CISA SSVC
What it is

An attacker who can submit untrusted structured input to an affected application, and have that structure preserved in LangChain run data, may be able to inject LangChain serialized constructor payloads such as: If this payload reaches a broad load() call, LangChain may instantiate the referenced class instead of treating the payload as inert user data. Realistic impacts include: Persistent chat-history poisoning when revived AIMessage, HumanMessage, or SystemMessage objects are stored by RunnableWithMessageHistory. Prompt injection or behavior manipulation if attacker-controlled messages are later included in model context.

What to do

Upgrade langchain-core to 1.3.3 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.

LangChain will deprecate the affected APIs as part of this fix: RunnableWithMessageHistory astreamlog() astreamevents(version="v1") These are older code paths that are no longer recommended for new applications. They were not previously marked as deprecated, but recent LangChain documentation has primarily directed users toward newer streaming and memory patterns, including the stream API. Applications should migrate to the currently recommended APIs rather than continue depending on these older surfaces. Separately, LangChain will update load() and loads() to tighten deserialization behavior so broad object revival is not applied implicitly to untrusted or application-controlled payloads.

Affected
PackageRegistryAffectedFixed in
langchain-corePyPI<= 0.3.840.3.85
langchain-corePyPI>= 1.0.0, <= 1.3.21.3.3

The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.

Sources: GitHub Advisory Database, reviewed and malware advisories (CC BY 4.0, https://github.com/advisories); advisories published by Cursor (https://github.com/cursor/cursor/security/advisories); advisories published by OpenClaw (https://github.com/openclaw/openclaw/security/advisories); advisories published by vLLM (https://github.com/vllm-project/vllm/security/advisories); advisories published by Open WebUI (https://github.com/open-webui/open-webui/security/advisories); advisories published by n8n (https://github.com/n8n-io/n8n/security/advisories); advisories published by Flowise (https://github.com/FlowiseAI/Flowise/security/advisories); advisories published by Langflow (https://github.com/langflow-ai/langflow/security/advisories); advisories published by the MCP Python SDK project (https://github.com/modelcontextprotocol/python-sdk/security/advisories); advisories published by MLflow (https://github.com/mlflow/mlflow/security/advisories); CISA Known Exploited Vulnerabilities catalog (CC0). Data as of 2026-11-22. ShieldMap describes how each problem works and how to fix it; it does not publish exploit code. Report a correction to [email protected].