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
- @langchain/core < 0.3.80, fixed in 0.3.80
- langchain >= 1.0.0, < 1.2.3, fixed in 1.2.3
- 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.
Related items
- HighCVE-2026-106119: LangChain MongoDBChatMessageHistory query injection via session identifierSame vendor · NVD/CVE Database
- LowGHSA-5x6v-p487-7qh2: LangChain: RediSearch Filter Injection via Unescaped Tag/Text ValuesSame vendor · GitHub Advisory Database
- HighGHSA-fvww-7h3r-vfhp: LangGraph SDK custom auth silently ignores actions= on resource decoratorsSame vendor · GitHub Advisory Database
- HighCVE-2026-72848: SitemapLoader nested sitemap entries bypass restrict_to_same_domainSame vendor · NVD/CVE Database
- HighGHSA-533j-2v4q-mw5h: LangChain MongoDB has NoSQL Operator Injection in MongoDBSaver.list() leading to cross-tenant data exposureSame vendor · GitHub Advisory Database