CRITICAL🇵🇱 Wersja polska

CVE-2025-68664

CVSS 9.3v3.1pub. 2025-12-23upd. 2026-01-13

LangChain is a framework for building agents and LLM-powered applications. Prior to versions 0.3.81 and 1.2.5, a serialization injection vulnerability exists in LangChain's dumps() and dumpd() functions. The functions do not escape dictionaries with 'lc' keys when serializing free-form dictionaries. 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 versions 0.3.81 and 1.2.5.

🤖 AI Analysis
How it works

The dumps() and dumpd() functions used for data serialization do not filter dictionaries containing the 'lc' key, which is internally reserved by LangChain to mark serialized objects. If user-controlled data contains such a key structure, it is treated during deserialization as a valid LangChain object rather than plain user data. This results in untrusted data being processed by the framework's deserialization mechanisms (CWE-502: Deserialization of Untrusted Data).

Impact

An attacker can provide crafted data that, after deserialization, will be treated as legitimate LangChain objects, which may lead to disclosure of sensitive information and limited modification of the application state. The vulnerability has a scope exceeding the original component (S:C), which increases the potential impact on the environment.

Mitigation & patch

LangChain Core should be updated to version 0.3.81 or 1.2.5 (or newer). Patches are available in the LangChain project GitHub repository (commits 5ec0fa69 and d9ec4c5c). Until updating, avoid passing untrusted user data directly to the dumps() and dumpd() functions.

Who is affected

LangChain Core in versions before 0.3.81 and before 1.2.5

Analysis generated by Claude AI (Anthropic) based on NVD data. Always verify with vendor.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N
  • Langchain Core

    APP
    Langchain
    < 0.3.811.0.0 – 1.2.5 (excl.)
🔵
CHECK WITH VENDOR
No clear patch data available. Check vendor references.
Tags
Deserialization
CWE
References

Related vulnerabilities

CVE-2026-34070HIGH7.5same product

LangChain is a framework for building agents and LLM-powered applications. Prior to version 1.2.22, multiple f...

CVE-2026-40087MEDIUM5.3same product

LangChain to framework do budowania agentów i aplikacji obsługiwanych przez LLM. Przed wersją 0.3.84 i 1.2.28 ...

CVE-2026-26013LOW3.7same product

LangChain to framework do budowania agentów i aplikacji napędzanych LLM-ami. Przed wersją 1.2.11 metoda ChatOp...

CVE-2025-2828CRITICAL10.0PL ✓same vendor

SSRF w LangChain RequestsToolkit — dostęp do sieci wewnętrznej i metadanych chmury

CVE-2024-7042CRITICAL9.8PL ✓same vendor

SQL injection przez prompt injection w LangChain GraphCypherQAChain