Skip to content
OpenAdvisories
Critical · 9.3 Public exploit CVE-2025-68664 EUVD-2025-204849GHSA-c67j-w6g6-q2cmPYSEC-2026-373

LangChain serialization injection vulnerability enables secret extraction in dumps/loads APIs

Published Dec 23, 2025 · Updated Dec 24, 2025 · Assigned by GitHub_M

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.

Affected products

VendorProductAffectedFixed
langchain-ai langchain >= 1.0.0, < 1.2.5, < 0.3.81 —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

Exploit-DB 1

GitHub 4 repositories

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI langchain-core >= 1.0.0, < 1.2.5 1.2.5 GHSA-c67j-w6g6-q2cm
PyPI langchain-core < 0.3.81 0.3.81 GHSA-c67j-w6g6-q2cm
PyPI langchain-core < 0.3.81 · >= 1.0.0, < 1.2.5 0.3.81, 1.2.5 PYSEC-2026-373

Advisories 1

References