CVE-2024-1455
JSON

5.9medium

Billion Laughs Attack leading to DoS in langchain-ai/langchain

Severity
5.9medium CVSS:3.0 by @huntr_ai
Exploit likelihood
0.87% (higher than 56% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
@huntr_ai
Also known as
GHSA-q84m-rmw3-4382PYSEC-2026-1519

Description

A vulnerability in the langchain-ai/langchain repository allows for a Billion Laughs Attack, a type of XML External Entity (XXE) exploitation. By nesting multiple layers of entities within an XML document, an attacker can cause the XML parser to consume excessive CPU and memory resources, leading to a denial of service (DoS).

Affected

Product or packageVersionsReported by
langchain-ai langchain-ai/langchainfrom unspecified before 0.1.35CVE List
langchain-ai langchain-ai\/langchainbefore 0.1.35CVE List
langchain-core (PyPI)before 0.1.35GitHub Advisory Database, PyPA Advisory Database
langchain langchainfrom 0.1.4 up to 0.1.35NVD

All scores

@huntr_ai5.9medium CVSS:3.0CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub5.9medium CVSS:3.0CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
PyPA Advisory Database5.9medium CVSS:3.0CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-776

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

A vulnerability in the langchain-ai/langchain repository allows for a Billion Laughs Attack, a type of XML External Entity (XXE) exploitation. By nesting multiple layers of entities within an XML document, an attacker can cause the XML parser to consume excessive CPU and memory resources, leading to a denial of service (DoS).

GitHub Advisory Database

The XMLOutputParser in LangChain uses the etree module from the XML parser in the standard python library which has some XML vulnerabilities; see: https://docs.python.org/3/library/xml.html

This primarily affects users that combine an LLM (or agent) with the XMLOutputParser and expose the component via an endpoint on a web-service.

This would allow a malicious party to attempt to manipulate the LLM to produce a malicious payload for the parser that would compromise the availability of the service.

A successful attack is predicated on:

  1. Usage of XMLOutputParser
  2. Passing of malicious input into the XMLOutputParser either directly or by trying to manipulate an LLM to do so on the users behalf
  3. Exposing the component via a web-service
NVD (es)

XMLOutputParser en LangChain utiliza el módulo etree del analizador XML en la biblioteca estándar de Python que tiene algunas vulnerabilidades XML; consulte: https://docs.python.org/3/library/xml.html Esto afecta principalmente a los usuarios que combinan un LLM (o agente) con `XMLOutputParser` y exponen el componente a través de un endpoint en un servicio web. Esto permitiría que una parte malintencionada intentara manipular el LLM para producir un payload malicioso para el analizador que comprometería la disponibilidad del servicio. Un ataque exitoso se basa en: 1. Uso de XMLOutputParser 2. Pasar entradas maliciosas al XMLOutputParser, ya sea directamente o intentando manipular un LLM para que lo haga en nombre del usuario 3. Exponer el componente a través de un servicio web

References

Sources

SourceRecordLicence
CVE ListCVE-2024-1455 changed 2024-08-15CVE Terms of Use
GitHub Advisory DatabaseGHSA-q84m-rmw3-4382 changed 2026-07-07CC-BY-4.0
NVDCVE-2024-1455 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2026-1519 changed 2026-07-07CC-BY-4.0