HighVulnerabilityLLM-specific
CVE-2025-68665: LangChain JS serialization injection through toJSON and JSON.stringify
- Source
- NVD(opens in a new tab)
- Identifier
- CVE-2025-68665
- Published
- Record updated
- Affected
- @langchain/core >= 1.0.0, < 1.1.8, fixed in 1.1.8, released December 22, 2025, 2 days before disclosure
- @langchain/core < 0.3.80, fixed in 0.3.80, released December 22, 2025, 1 day before disclosure
- langchain >= 1.0.0, < 1.2.3, fixed in 1.2.3, released December 22, 2025, 2 days before disclosure
- and 1 more
- Known exploitation
- Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
- EPSS
- 0.8%
Summary
LangChain JS versions of @langchain/core before 0.3.80 and 1.1.8, and of langchain before 0.3.37 and 1.2.3, contain a serialization injection flaw in the toJSON() method and in JSON.stringify() output. The method does not escape objects carrying the internal 'lc' key when serializing free-form kwargs data. User-controlled input containing that key structure is then treated as a legitimate LangChain object during deserialization instead of plain data.
Mitigation
Fixed in @langchain/core 0.3.80 and 1.1.8, and in langchain 0.3.37 and 1.2.3.
Affected packages in the Exposure Registry
Matched by package name and ecosystem. Each entry shows whether the package delegates to a language model and how many tracked packages depend on it.
- langchainnpmLLM dependency since 2023-02-14 · 5 tracked dependents
- @langchain/corenpmLLM dependency since 2023-11-22 · 9 tracked dependents
Related items
- MediumGHSA-8prr-f582-jqq3: LangGraph CLI prints the registry push token in `langgraph deploy --verbose` outputSame vendor · GitHub Advisory Database
- HighGHSA-4hm6-w6qq-w73v: LangGraph JavaScript custom authentication may permit cross-user Store accessSame vendor · GitHub Advisory Database
- MediumGHSA-3fx2-cqw9-xr3c: LangGraph: Unencoded identifiers in LangGraph SDK v3 streaming can redirect authenticated GET requestsSame vendor · GitHub Advisory Database
- MediumGHSA-6hmw-9432-67qq: LangGraph: Namespace labels containing `.` reach other namespaces in Postgres and SQLite storesSame vendor · GitHub Advisory Database
- MediumCVE-2026-108575: BerriAI LiteLLM improper authorization in secret resolution via api_keySame vendor · NVD/CVE Database