CVE-2025-68665 LangChain serialization injection vulnerability enables secret extraction
- 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.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| 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
| Product | Affected versions | Fixed 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
- https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-r399-636x-v7f6 exploit vendor-advisory
- https://github.com/langchain-ai/langchainjs/commit/e5063f9c6e9989ea067dfdff39262b9e7b6aba62 patch
- https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain%2Fcore%401.1.8 release-notes
- https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.3 release-notes
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com
- Red Hat CVE page mitigation vendor-advisory
- RHSA-2026:3713 patch vendor-advisory
- Red Hat Bugzilla 2424797 issue-tracking
- www.cve.org
- github.com product