Skip to main content

Langchain Core

2 CVEs product

Monthly

CVE-2025-68665 Dec 23, 23:15 npm CRITICAL PATCH Act Now

Serialization injection in LangChain JS affects @langchain/core before 0.3.80 and 1.0.0 through 1.1.7, plus langchain before 0.3.37 and 1.0.0 through 1.2.2, where Serializable.toJSON() fails to escape user-controlled objects containing an 'lc' key inside kwargs such as metadata, additional_kwargs, or response_metadata. If an application later deserializes that JSON with load(), injected data can be treated as legitimate LangChain objects, enabling secret extraction when pre-patch secretsFromEnv behavior is in effect or instantiation of classes already exposed through configured import maps. NVD rates this 9.1, but the assessed vector is AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N because meaningful exploitation requires the specific serialize-then-load workflow and, for the most damaging outcomes, permissive secret or import-map configuration; no public exploit was identified at time of analysis.

Deserialization Red Hat Langchain Js Langchain Core
NVD GitHub
CVSS 3.1
9.1
EPSS
0.8%
CVE-2025-68664 Dec 23, 23:15 PyPI HIGH POC PATCH THREAT GHSA This Week

Serialization injection in langchain-core (below 0.3.81, and 1.0.0 through 1.2.4) allows unauthenticated attackers to smuggle 'lc'-keyed dictionaries through user-controlled fields such as metadata, additional_kwargs, or response_metadata, so that load()/loads() later treats attacker data as a legitimate LangChain Serializable object instead of plain data, enabling secret extraction and instantiation of trusted-namespace classes whose __init__ performs side effects like file or network operations. Exposure is conditional rather than universal: the application must either serialize untrusted data with dumps()/dumpd() and later deserialize it, use astream_events(version='v1'), or use Runnable.astream_log() - astream_events v2 is explicitly not affected, and class instantiation remains confined to the pre-approved langchain_core, langchain, and langchain_community namespaces. Publicly available exploit code exists and NVD rates the flaw 8.2, though our assessment applies AC:H given the preconditions; CISA KEV does not list it, so this is a genuine but conditional risk rather than a drop-everything emergency, and the fix ships breaking changes that require planning.

Deserialization Red Hat Langchain Core
NVD GitHub Exploit-DB
CVSS 3.1
8.2
EPSS
42.9%
EPSS 1% CVSS 9.1
CRITICAL PATCH Act Now

Serialization injection in LangChain JS affects @langchain/core before 0.3.80 and 1.0.0 through 1.1.7, plus langchain before 0.3.37 and 1.0.0 through 1.2.2, where Serializable.toJSON() fails to escape user-controlled objects containing an 'lc' key inside kwargs such as metadata, additional_kwargs, or response_metadata. If an application later deserializes that JSON with load(), injected data can be treated as legitimate LangChain objects, enabling secret extraction when pre-patch secretsFromEnv behavior is in effect or instantiation of classes already exposed through configured import maps. NVD rates this 9.1, but the assessed vector is AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N because meaningful exploitation requires the specific serialize-then-load workflow and, for the most damaging outcomes, permissive secret or import-map configuration; no public exploit was identified at time of analysis.

Deserialization Red Hat Langchain Js +1
NVD GitHub
EPSS 43% CVSS 8.2
HIGH POC PATCH THREAT This Week

Serialization injection in langchain-core (below 0.3.81, and 1.0.0 through 1.2.4) allows unauthenticated attackers to smuggle 'lc'-keyed dictionaries through user-controlled fields such as metadata, additional_kwargs, or response_metadata, so that load()/loads() later treats attacker data as a legitimate LangChain Serializable object instead of plain data, enabling secret extraction and instantiation of trusted-namespace classes whose __init__ performs side effects like file or network operations. Exposure is conditional rather than universal: the application must either serialize untrusted data with dumps()/dumpd() and later deserialize it, use astream_events(version='v1'), or use Runnable.astream_log() - astream_events v2 is explicitly not affected, and class instantiation remains confined to the pre-approved langchain_core, langchain, and langchain_community namespaces. Publicly available exploit code exists and NVD rates the flaw 8.2, though our assessment applies AC:H given the preconditions; CISA KEV does not list it, so this is a genuine but conditional risk rather than a drop-everything emergency, and the fix ships breaking changes that require planning.

Deserialization Red Hat Langchain Core
NVD GitHub Exploit-DB

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy