Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. langchain-core
  4. ›
  5. CVE-2026-44843

CVE-2026-44843: LangChain vulnerable to unsafe deserialization of attacker-controlled objects through overly broad `load()` allowlists

May 8, 2026

LangChain contains older runtime code paths that deserialize run inputs, run outputs, or other application-controlled payloads using overly broad object allowlists. These paths may call load() with allowed_objects="all". This does not enable arbitrary Python object deserialization, but it does allow any trusted LangChain-serializable object to be revived, which is broader than these runtime paths require. As a result, attacker-supplied LangChain serialized constructor dictionaries may cause trusted runtime paths to instantiate classes with untrusted constructor arguments.

Applications are exposed only when all of the following are true:

  1. The application accepts untrusted structured input, such as JSON, from a user or network request.
  2. The application does not validate or canonicalize that input into an inert schema before invoking LangChain.
  3. Attacker-controlled nested dictionaries or lists are preserved in LangChain run inputs or outputs.
  4. The application uses an affected API path that later deserializes that run data.

Known affected runtime surfaces include:

  • RunnableWithMessageHistory
  • astream_log()
  • astream_events(version="v1")

Related unsafe deserialization patterns may also affect applications that explicitly load serialized LangChain prompt or runnable objects from untrusted sources, including shared prompt stores, Hub artifacts with model configuration, or other application-controlled serialization stores.

Applications that validate incoming requests against a fixed schema, such as coercing user input to a plain string or message-content field before invoking LangChain, are unlikely to expose this deserialization primitive.

This release also fixes a related secret-marker validation bypass in the serialization and deserialization layer (_is_lc_secret). That issue creates an additional path by which attacker-controlled constructor dictionaries can avoid escaping during dumps() -> loads() round-trips and reach LangChain object revival logic.

References

  • github.com/advisories/GHSA-pjwx-r37v-7724
  • github.com/langchain-ai/langchain
  • github.com/langchain-ai/langchain/security/advisories/GHSA-pjwx-r37v-7724
  • nvd.nist.gov/vuln/detail/CVE-2026-44843

Code Behaviors & Features

Detect and mitigate CVE-2026-44843 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.3.85, all versions starting from 1.0.0 before 1.3.3

Fixed versions

  • 1.3.3
  • 0.3.85

Solution

Upgrade to versions 0.3.85, 1.3.3 or above.

Impact 8.2 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-502: Deserialization of Untrusted Data

Source file

pypi/langchain-core/CVE-2026-44843.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 00:19:24 +0000.