Skip to main content
CVE-2025-68664VulnerabilityPublished Updated

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

Affects langchain-coreSource GCVE Database

0
Authoritative record:CVE-2025-68664· Critical 9.3

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

CVSS 3.1 base score
9.3Critical
How severe the flaw is on the 0–10 CVSS scale.
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:N

Exploitation evidence

t = 0 is the CVE’s publication on cve.org

  1. Disclosed: evidence found.

    CVE published 23 Dec 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  4. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

Timeline

  1. CVE ID reserved

    by GitHub, Inc.

    , 23 hours before disclosure

  2. CVE published

    on cve.org

    , t = 0

  3. In Threat Radar

    record ingested

    , 9 minutes after disclosure

  4. 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

ProductAffectedFixed in
PyPIlangchain-coreAffected
  • >=1.0.0 <1.2.5
Fixed in
  • 1.2.5
PyPIlangchain-coreAffected
  • <0.3.81
Fixed in
  • 0.3.81

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

Community reviews

Loading reviews…