CVE-2025-68665 json
LangChain serialization injection vulnerability enables secret extraction
published 2025-12-23 10 mo ago modified 2026-10-19 20 d ago also GHSA-r399-636x-v7f6 , EUVD-2025-204846
- cvss
- 8.6
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.8%
- EPSS 0.8% chance of exploitation in 30 days, percentile 56%
- public exploits
- 0
- none known
Summary
LangChain is a framework for building LLM-powered applications. Prior to @langchain/core versions 0.3.80 and 1.1.8, and prior to langchain versions 0.3.37 and 1.2.3, a serialization injection vulnerability exists in LangChain JS's toJSON() method (and subsequently when string-ifying objects using JSON.stringify(). The method did not escape objects with 'lc' keys when serializing free-form data in kwargs. 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 @langchain/core versions 0.3.80 and 1.1.8, and langchain versions 0.3.37 and 1.2.3
Patch / fix
- npm @langchain/core 0.3.80, 1.1.8
- npm langchain 0.3.37, 1.2.3
- langchain langchain.js 0.3.37, 1.2.3
- langchain langchain/core 0.3.80, 1.1.8
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2025-68665 updated cvss 8.6
langchain-core: LangChain: Arbitrary Code Execution via Serialization Injection
-
Red Hat OpenShift Lightspeed openshift-lightspeed/lightspeed-service-api-rhel9 Red Hat Ansible Automation Platform 2 ansible-automation-platform-24/lightspeed-rhel8, ansible-automation-platform-26/lightspeed-rhel9affected: workaround, no fix available
-
Red Hat OpenShift AI 3.3 rhoai 1771415661fixed: vendor fix RHSA-2026:3713
-
Red Hat Ansible Automation Platform 2 ansible-automation-platform/ee-minimal-rhel8, ansible-automation-platform/ee-minimal-rhel9, ansible-automation-platform-26/mcp-tools-rhel9, ansible-automation-platform-24/de-minimal-rhel8, ansible-automation-platform-24/de-minimal-rhel9, ansible-automation-platform-24/ee-minimal-rhel8, +28 more Red Hat Enterprise Linux AI (RHEL AI) rhelai1/bootc-amd-rhel9, rhelai1/bootc-intel-rhel9, rhelai1/bootc-nvidia-rhel9, rhelai1/bootc-azure-amd-rhel9, rhelai1/instructlab-amd-rhel9, rhelai1/bootc-aws-nvidia-rhel9, +4 morenot affected: vulnerable code not present
-
Red Hat OpenShift AI (RHOAI) rhoai/odh-trustyai-ragas-lls-provider-dsp-rhel9not affected: component not present
-
Red Hat OpenShift AI 3.3 rhoai 1769162595, rhoai 1769436305, rhoai 1769519975, rhoai 1770277795, rhoai 1770735854, rhoai 1770754585, +71 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 10 mo ago
Exploit prediction
0.79% chance of exploitation in the next 30 days, higher than 56% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-r399-636x-v7f6 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.6 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N |
| NVD | 3.1 | 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
| GitHub | 3.1 | 8.6 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | @langchain/core | >=1.0.0, <1.1.8 <0.3.80 |
1.1.8 0.3.80 |
| npm | langchain | >=1.0.0, <1.2.3 <0.3.37 |
1.2.3 0.3.37 |
Affected products
- langchain-ai langchainjs
Classification
- Weakness
-
- CWE-502 Deserialization of Untrusted Data
References
-
github.com
/langchain-ai/langchainjs/commit/e5063f9c6e9989ea067dfdff39262b9e7b6aba62
web, patch
-
github.com
/langchain-ai/langchainjs/security/advisories/GHSA-r399-636x-v7f6
exploit, web, vendor-advisory
-
github.com
/langchain-ai/langchainjs/releases/tag/%40langchain%2Fcore%401.1.8
web, release-notes
-
github.com
/langchain-ai/langchainjs/releases/tag/langchain%401.2.3
web, release-notes
-
nvd.nist.gov
/vuln/detail/CVE-2025-68665
advisory
-
github.com
/langchain-ai/langchainjs
package
Sources
- CVE List CVE-2025-68665
- GitHub Advisory GHSA-r399-636x-v7f6
- NVD CVE-2025-68665
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.