LangChain serialization injection vulnerability enables secret extraction in dumps/loads APIs
Summary
| CVE | CVE-2025-68664 |
|---|---|
| State | PUBLISHED |
| Assigner | GitHub_M |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2025-12-23 23:15:44 UTC |
| Updated | 2026-10-19 22:10:00 UTC |
| 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. |
Risk And Classification
Primary CVSS: v3.1 8.2 HIGH from [email protected]
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N
Problem Types: CWE-502 | CWE-502 CWE-502: Deserialization of Untrusted Data
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Primary | 8.2 | HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N |
| 3.1 | [email protected] | Secondary | 9.3 | CRITICAL | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N |
| 3.1 | CNA | DECLARED | 9.3 | CRITICAL | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
NoneUser Interaction
NoneScope
UnchangedConfidentiality
HighIntegrity
LowAvailability
NoneCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N
NVD Known Affected Configurations (CPE 2.3)
| Type | Vendor | Product | Version | Update | Edition | Language |
|---|---|---|---|---|---|---|
| Application | Langchain | Langchain Core | All | All | All | All |
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Langchain-ai | Langchain | affected >= 1.0.0, < 1.2.5 | Not specified |
| CNA | Langchain-ai | Langchain | affected < 0.3.81 | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/langchain-ai/langchain/commit/d9ec4c5cc78960abd37da79b0250f56... | [email protected] | github.com | Patch |
| github.com/langchain-ai/langchain/commit/5ec0fa69de31bbe3d76e4cf9cd65a6a... | [email protected] | github.com | Patch |
| github.com/langchain-ai/langchain/pull/34455 | [email protected] | github.com | Issue Tracking, Patch |
| github.com/langchain-ai/langchain/security/advisories/GHSA-c67j-w6g6-q2cm | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | github.com | Exploit, Vendor Advisory |
| github.com/langchain-ai/langchain/pull/34458 | [email protected] | github.com | Issue Tracking, Patch |
| github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D1.2.5 | [email protected] | github.com | Release Notes |
| github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D0.3.81 | [email protected] | github.com | Release Notes |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.