LangChain serialization injection vulnerability enables secret extraction in dumps/loads APIs
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · Low · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-502.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| langchain-ai | langchain | 1.0.0 to before 1.2.5; before 0.3.81 | 1.2.5, 0.3.81 | Patch available | CNA |
| — | langchain-core (PyPI) | 1.0.0 to before 1.2.5 | 1.2.5 | Patch available | GHSA-c67j-w6g6-q2cm |
| — | langchain-core (PyPI) | before 0.3.81 | 0.3.81 | Patch available | GHSA-c67j-w6g6-q2cm |
- langchain Vendorlangchain-ai Affected 1.0.0 to before 1.2.5; before 0.3.81 Fixed in 1.2.5, 0.3.81 Patch available CNA
- langchain-core (PyPI) Vendor— Affected 1.0.0 to before 1.2.5 Fixed in 1.2.5 Patch available GHSA-c67j-w6g6-q2cm
- langchain-core (PyPI) Vendor— Affected before 0.3.81 Fixed in 0.3.81 Patch available GHSA-c67j-w6g6-q2cm
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:langchain:langchain_core:*:*:*:*:*:python:*:* | before 0.3.81; 1.0.0 to before 1.2.5 | Vulnerable | langchain-ai |
- cpe:2.3:a:langchain:langchain_core:*:*:*:*:*:python:*:* Versions before 0.3.81; 1.0.0 to before 1.2.5 Vulnerable ·langchain-ai
Remediation
- Fix · CNA langchain (langchain-ai) Fixed in 1.2.5, 0.3.81
- Fix · GHSA-c67j-w6g6-q2cm langchain-core (PyPI) Fixed in 1.2.5 Advisory →
- Fix · GHSA-c67j-w6g6-q2cm langchain-core (PyPI) Fixed in 0.3.81 Advisory →
Red Hat 4 advisories
- RHSA-2026:1610 Released 2026-01-30 · Red Hat rating CriticalRed Hat OpenShift Lightspeed 1.0.9 security update
- Red Hat OpenShift Lightspeed 1.1.5 registry.redhat.io/openshift-lightspeed/lightspeed-service-api-rhel9
- RHSA-2026:0409 Released 2026-01-08 · Red Hat rating CriticalRed Hat Ansible Automation Platform 2.5 Container Release Update
- Red Hat Ansible Automation Platform 2.5 registry.redhat.io/ansible-automation-platform-25/gateway-rhel8, registry.redhat.io/ansible-automation-platform-25/lightspeed-chatbot-rhel8, registry.redhat.io/ansible-automation-platform-25/lightspeed-rhel8
- RHSA-2026:0408 Released 2026-01-08 · Red Hat rating CriticalRed Hat Ansible Automation Platform 2.6 Container Release Update
- Red Hat Ansible Automation Platform 2.6 registry.redhat.io/ansible-automation-platform-26/gateway-rhel9, registry.redhat.io/ansible-automation-platform-26/lightspeed-rhel9
Show 1 more Red Hat advisories
- RHSA-2026:0406 Released 2026-01-08 · Red Hat rating CriticalRed Hat Ansible Automation Platform 2.4 Container Release Update
- Red Hat Ansible Automation Platform 2.4 registry.redhat.io/ansible-automation-platform-24/lightspeed-rhel8
Vendor assessments
Red Hat
Red Hat rating: Critical. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Ansible Automation Platform 2.4 | Fixed | RHSA-2026:0406 |
| Red Hat Ansible Automation Platform 2.5 | Fixed | RHSA-2026:0409 |
| Red Hat Ansible Automation Platform 2.6 | Fixed | RHSA-2026:0408 |
| Red Hat OpenShift Lightspeed 1.1.5 | Fixed | RHSA-2026:1610 |
Not affected: 7 products
- Red Hat Ansible Automation Platform 2
- Red Hat Ansible Automation Platform 2.4
- Red Hat Ansible Automation Platform 2.5
- Red Hat Ansible Automation Platform 2.6
- Red Hat Enterprise Linux AI (RHEL AI)
- Red Hat OpenShift AI (RHOAI)
- Red Hat OpenShift Lightspeed 1.1.5
Timeline
- 2026-10-02 Threatist record created from CVE-2025-68664
- 2026-10-03 Alias added: GHSA-c67j-w6g6-q2cm
- 2026-10-16 Fix available: Red Hat OpenShift Lightspeed 1.1.5 · Red Hat
References
Patch 4
Other 5
- https://github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D0.3.81
- https://github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D1.2.5
- https://github.com/langchain-ai/langchain
- https://github.com/pypa/advisory-database/tree/main/vulns/langchain-core/PYSEC-2026-373.yaml
- https://pypi.org/project/langchain-core
More langchain-ai Langchain Core vulnerabilities
- TI-2026-26395 LangChain Core has Path Traversal vulnerabilites in legacy `load_prompt` functions CVSS 3.1HIGH 7.5
- TI-2026-28915 LangChain has incomplete f-string validation in prompt templates CVSS 3.1MEDIUM 5.3
- TI-2026-21027 LangChain affected by SSRF via image_url token counting in ChatOpenAI.get_num_tokens_from_messages CVSS 3.1LOW 3.7
Sources
- CVE-2025-68664 · CVE Program
- CVE-2025-68664 · NVD
- FIRST EPSS
- GHSA-c67j-w6g6-q2cm · GitHub Advisory Database · CC BY 4.0
- CVE-2025-68664 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences