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
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68665.json",
"cna_assigner": "GitHub_M",
"unresolved_ranges": [
{
"source": "AFFECTED_FIELD",
"extracted_events": [
{
"introduced": "@langchain/core >= 1.0.0, < 1.1.8"
},
{
"last_affected": "@langchain/core >= 1.0.0, < 1.1.8"
},
{
"introduced": "langchain >= 1.0.0, < 1.2.3"
},
{
"last_affected": "langchain >= 1.0.0, < 1.2.3"
},
{
"introduced": "langchain < 0.3.37"
},
{
"last_affected": "langchain < 0.3.37"
}
]
}
],
"cwe_ids": [
"CWE-502"
]
}{
"cpe": [
"cpe:2.3:a:langchain:langchain.js:*:*:*:*:*:*:*:*",
"cpe:2.3:a:langchain:langchain\\/core:*:*:*:*:*:node.js:*:*"
],
"source": [
"CPE_RANGE",
"REFERENCES"
],
"extracted_events": [
{
"introduced": "1.0.0"
},
{
"fixed": "1.2.3"
},
{
"fixed": "1.1.8"
},
{
"introduced": "0"
},
{
"fixed": "0.3.80"
}
]
}