Deserialization of Untrusted Data in langchain-core
CVE-2025-68664
- langchain-core
Summary
LangChain is a framework for building agents and LLM-powered applications. Prior to versions 0.3.81 and 1.x prior to 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.
- LOW
- NETWORK
- LOW
- UNCHANGED
- NONE
- NONE
- HIGH
- NONE
CWE-502 - Deserialization of Untrusted Data
Deserialization of untrusted data vulnerabilities enable an attacker to replace or manipulate a serialized object, replacing it with malicious data. When the object is deserialized at the victim's end the malicious data is able to compromise the victim’s system. The exploit can be devastating, its impact may range from privilege escalation, broken access control, or denial of service attacks to allowing unauthorized access to the application's internal code and logic which can compromise the entire system.
References
Advisory Timeline
- Published