Secret extraction via unescaped lc-keyed objects
Published Dec 23, 2025 · Updated Dec 23, 2025
Serialization injection in LangChain.js allows remote attackers controlling serialized data to read environment-variable secrets. Serializable.toJSON() leaves lc-keyed objects unescaped in free-form kwargs, so load() later interprets attacker data as internal serialized objects. Secret extraction requires secretsFromEnv; constructor injection is limited to classes present in configured import maps.
Summary
What happened
Serialization injection in LangChain.js allows remote attackers controlling serialized data to read environment-variable secrets. Serializable.toJSON() leaves lc-keyed objects unescaped in free-form kwargs, so load() later interprets attacker data as internal serialized objects. Secret extraction requires secretsFromEnv; constructor injection is limited to classes present in configured import maps.
The record
- CVE
- CVE-2025-68665
- Published
- Dec 23, 2025
- Updated
- Dec 23, 2025
- Vendor
- LangChain
- Product
- LangChain.js
- Classifications
- CWE-502, T1552
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Dec 23, 2025CVE publishedPublication date reported by the CVE source.
- Dec 23, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=langchain < 0.3.37
- Affected versionversion=langchain >= 1.0.0, < 1.2.3
- Affected versionversion=@langchain/core < 0.3.80
- Affected versionversion=@langchain/core >= 1.0.0, < 1.1.8
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Public exploit references
- Vendor secret-extraction exploit exampleproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo