LangChain serialization injection vulnerability enables secret extraction in dumps/loads APIs (langchain-ai langchain)

CVE-2025-68664
CRITICAL 9.3

En bref

Source
NVD
EPSS
EPSS 42.93 % · centile 99 ()
État
PUBLISHED
Publiée
Mise à jour
Attribuée par
GitHub_M
Statut NVD
Analyzed

Description

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.

Faiblesses (CWE)

  • CWE-502 — Désérialisation de données non fiables

Références

Scores

VersionScoreVecteurÉvalué par
CVSS 3.1CRITICAL 9.3CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:NGitHub_M
CVSS 3.1CRITICAL 9.3CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:NNVD · security-advisories@github.com (Secondary)
CVSS 3.1HIGH 8.2CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:NNVD · nvd@nist.gov (Primary)

Avis

Références européennes

Avis du CERT-FR

Configurations affectées (CPE NVD)

Produits affectés

ProduitVersions
langchain-ai · langchainaffected >= 1.0.0, < 1.2.5 ; affected < 0.3.81

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD