Security Resilience

CVE-2025-68664

RCE in Langchain Core ≤ 0.3.81

Published
23 December 2025
Modified
19 October 2026
Patch / advisory
CVSS Score v3.1 9.3
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N
EPSS Score 0.44 99th percentile
Risk Priority 85 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2025-68664 is a critical-severity Deserialization of Untrusted Data (CWE-502) vulnerability in Langchain Core. Its CVSS base score is 9.3 (Critical).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploitation for Privilege Escalation (T1068); ranked in the top 1% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

This vulnerability is AI-related — categorised as NLP and Transformers; in the LLM/Generative AI Risks risk domain.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SI-10 (Information Input Validation) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

LangChain, a framework for building agents and LLM-powered applications, contains a serialization injection vulnerability in its dumps() and dumpd() functions prior to versions 0.3.81 and 1.2.5. The functions fail to escape dictionaries containing 'lc' keys when handling free-form user data, allowing such structures to be misinterpreted as internal LangChain serialized objects during later deserialization rather than treated as plain data. This stems from CWE-502 deserialization of untrusted data and carries a CVSS 3.1 score of 9.3.

An unauthenticated remote attacker can supply crafted dictionaries with 'lc' keys through any input path that reaches these serialization routines. Upon deserialization the data is processed as a legitimate LangChain object, enabling injection that can result in high-impact confidentiality loss and limited integrity effects across affected applications.

The issue is addressed in the referenced commits and pull requests that add proper escaping for 'lc' keys, with official patches released in LangChain core 0.3.81 and LangChain 1.2.5. The EPSS score remains flat at 0.0262 with no material increase after disclosure.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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

more

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.

CWE(s)

AI Security AnalysisAI

AI Category
NLP and Transformers
Risk Domain
LLM/Generative AI Risks
OWASP Top 10 for LLMs 2025
None mapped
Classification Reason
Matched keywords: langchain, llm

Related Threats

MITRE ATT&CK Enterprise Techniques

MITRE ATT&CK v20.0

T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1203 Exploitation for Client Execution Execution
Adversaries may exploit software vulnerabilities in client applications to execute code.
T1210 Exploitation of Remote Services Lateral Movement
Adversaries may exploit remote services to gain unauthorized access to internal systems once inside of a network.
T1499.004 Application or System Exploitation Impact
Adversaries may exploit software vulnerabilities that can cause an application or system to crash and deny availability to users.
T1499 Endpoint Denial of Service Impact
Adversaries may perform Endpoint Denial of Service (DoS) attacks to degrade or block the availability of services to users.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-34070Same product: Langchain Langchain Core
CVE-2026-40087Same product: Langchain Langchain Core
CVE-2026-26013Same product: Langchain Langchain Core
CVE-2025-68665Same vendor: Langchain
CVE-2026-44843Same vendor: Langchain
CVE-2026-28277Same vendor: Langchain
CVE-2024-5998Same vendor: Langchain
CVE-2026-48775Same vendor: Langchain
CVE-2023-6730Shared CWE-502
CVE-2023-7018Shared CWE-502

Affected Assets

langchain
langchain core
≤ 0.3.81 · 1.0.0 — 1.2.5

Mitigating Controls

Mitigating Controls (NIST 800-53 r5)

Our mappings, made for this CVE.

Developer testing and evaluation can uncover deserialization flaws before deployment.

Input validation directly stops deserialization of untrusted data by ensuring inputs are valid before processing.

Engineering principles such as safe deserialization and input sanitization structurally prevent the weakness from being introduced.

Integrity verification tools can detect malformed or tampered serialized data after the fact.

Mitigating Controls (ISO/IEC 27001:2022 Annex A)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.

finds

Security testing includes validation of deserialization routines and the use of untrusted data, reducing the likelihood that unsafe object reconstruction will be deployed.

prevents

Training technical teams on secure deserialization practices reduces a minority of CWE-502 instances, but developers remain fallible and the owner explicitly identified A.8.29 (security testing) as the strongest control for this weakness, with A.8.28 (secure coding) graded only `partial` on the same pair.

prevents

Requiring vetted libraries, regular updates and SAST before release reduces the likelihood that deserialization logic will accept and act on attacker-controlled serialized objects.

finds

Regular scanning of third-party libraries and timely patching reduce the likelihood that unsafe deserialization vulnerabilities remain active.

References