Skip to content

CVE-2025-68665 LangChain serialization injection vulnerability enables secret extraction

CriticalCVSS 9.1 EPSS 0.79%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: yes · technical impact: partial
Technology
Red Hat

Description

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

Upgrade path

9 packages: 4 fixed, 4 with no fix yet.

PackageAffectedFixed inStatus
redhat/ansible-automation-platform-24/lightspeed-rhel8(Red Hat ansible_automation_platform 2) All versions No fix listed No fix yet
redhat/ansible-automation-platform-26/lightspeed-rhel9(Red Hat ansible_automation_platform 2) All versions No fix listed No fix yet
redhat/openshift-lightspeed/lightspeed-service-api-rhel9(Red Hat openshift_lightspeed 1) All versions No fix listed No fix yet
redhat/rhoai/odh-llama-stack-core-rhel9:1771415661(Red Hat openshift_ai 3.3 el9) All versions No fix listed No fix yet
@langchain langchain.js < 0.3.37; >= 1.0.0, < 1.2.3 0.3.37, 1.2.3 Fixed
@langchain langchaincore < 0.3.80; >= 1.0.0, < 1.1.8 0.3.80, 1.1.8 Fixed
@langchain/core(npm) < 0.3.80; >= 1.0.0, < 1.1.8 0.3.80, 1.1.8 Fixed
npm langchain(npm) < 0.3.37; >= 1.0.0, < 1.2.3 0.3.37, 1.2.3 Fixed
langchain-ai langchainjs = @langchain/core < 0.3.80; = @langchain/core >= 1.0.0, < 1.1.8; = langchain < 0.3.37; = langchain >= 1.0.0, < 1.2.3 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
@langchain/core(npm) >= 1.0.0, < 1.1.8 1.1.8
@langchain/core(npm) < 0.3.80 0.3.80
npm langchain(npm) >= 1.0.0, < 1.2.3 1.2.3
npm langchain(npm) < 0.3.37 0.3.37
langchain-ai langchainjs = @langchain/core >= 1.0.0, < 1.1.8 No fix listed
langchain-ai langchainjs = @langchain/core < 0.3.80 No fix listed
langchain-ai langchainjs = langchain >= 1.0.0, < 1.2.3 No fix listed
langchain-ai langchainjs = langchain < 0.3.37 No fix listed
redhat/rhoai/odh-llama-stack-core-rhel9:1771415661(Red Hat:openshift_ai:3.3::el9) All versions No fix listed
redhat/openshift-lightspeed/lightspeed-service-api-rhel9(Red Hat:openshift_lightspeed:1) All versions No fix listed
redhat/ansible-automation-platform-24/lightspeed-rhel8(Red Hat:ansible_automation_platform:2) All versions No fix listed
redhat/ansible-automation-platform-26/lightspeed-rhel9(Red Hat:ansible_automation_platform:2) All versions No fix listed
@langchain langchain.js < 0.3.37 0.3.37
@langchain langchain.js >= 1.0.0, < 1.2.3 1.2.3
@langchain langchaincore < 0.3.80 0.3.80
@langchain langchaincore >= 1.0.0, < 1.1.8 1.1.8

References