Langchain core: LangChain serialization injection vulnerability enables secret extraction in dumps/loads APIs
Affects langchain-coreSource GCVE Database
Public exploit available (Exploit-DB) · CVSS 9.3 Critical : upgrade to 1.2.5 as a priority.
Data as of 27 Oct 2026, 18:30 UTC
- Patch
- Available – fixed in 1.2.5, 0.3.81
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:NExploitation evidence
t = 0 is the CVE’s publication on cve.org
Disclosed: evidence found.
CVE published 23 Dec 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: evidence found.
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
Timeline
CVE ID reserved
by GitHub, Inc.
, 23 hours before disclosure
CVE published
on cve.org
, t = 0
In Threat Radar
record ingested
, 9 minutes after disclosure
First Exploit-DB entry (opens in a new tab)
LangChain Core 1.2.4 - SSTI/RCE
, 127 days after disclosure
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Upgrade langchain-core to 1.2.5; langchain-core to 0.3.81.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| PyPIlangchain-core | Affected
| Fixed in
|
| PyPIlangchain-core | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A patch is available in LangChain core versions 1.2.5 and 0.3.81 that fixes the escaping bug in dumps() and dumpd() and hardens deserialization defaults by restricting allowed objects, disabling secrets_from_env by default, and blocking Jinja2 templates. Users should upgrade to these fixed versions. If upgrading is not immediately possible, avoid deserializing untrusted data and disable secrets_from_env to prevent secret extraction. Review usage of vulnerable serialization APIs and avoid passing user-controlled data containing 'lc' keys to dumps() or dumpd().
Description
A serialization injection vulnerability in LangChain core affects the dumps() and dumpd() functions, which fail to escape user-controlled dictionaries containing 'lc' keys. This allows maliciously crafted serialized data to be deserialized as legitimate LangChain objects, enabling secret extraction from environment variables and instantiation of classes within trusted namespaces with attacker-controlled parameters. The vulnerability impacts applications that deserialize untrusted data or use certain LangChain features relying on vulnerable serialization. A patch is available in versions 1.2.5 and 0.3.81 that fixes the escaping bug and hardens deserialization defaults.
References
- github.com/langchain-ai/langchain/security/advisories/GHSA-c67j-w6g6-q2cm (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2025-68664 (opens in a new tab)
- github.com/langchain-ai/langchain/pull/34455 (opens in a new tab)
- github.com/langchain-ai/langchain/pull/34458 (opens in a new tab)
- github.com/langchain-ai/langchain/commit/5ec0fa69de31bbe3d76e4cf9cd65a6accb8466c8 (opens in a new tab)
- github.com/langchain-ai/langchain/commit/d9ec4c5cc78960abd37da79b0250f5642e6f0ce6 (opens in a new tab)
- github.com/langchain-ai/langchain (opens in a new tab)
- github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D0.3.81 (opens in a new tab)
- github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D1.2.5 (opens in a new tab)
- github.com/pypa/advisory-database/tree/main/vulns/langchain-core/PYSEC-2026-373.yaml (opens in a new tab)
- pypi.org/project/langchain-core (opens in a new tab)