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 package | Versions | Reported by |
|---|---|---|
| langchain-ai langchain-ai/langchain | from unspecified before 0.1.35 | CVE List |
| langchain-ai langchain-ai\/langchain | before 0.1.35 | CVE List |
| langchain-core (PyPI) | before 0.1.35 | GitHub Advisory Database, PyPA Advisory Database |
| langchain langchain | from 0.1.4 up to 0.1.35 | NVD |
All scores
| @huntr_ai | 5.9medium CVSS:3.0 | CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 5.9medium CVSS:3.0 | CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 5.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
| PyPA Advisory Database | 5.9medium CVSS:3.0 | CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
Classification
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:
- Usage of XMLOutputParser
- Passing of malicious input into the XMLOutputParser either directly or by trying to manipulate an LLM to do so on the users behalf
- 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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-1455 changed 2024-08-15 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-q84m-rmw3-4382 changed 2026-07-07 | CC-BY-4.0 |
| NVD | CVE-2024-1455 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2026-1519 changed 2026-07-07 | CC-BY-4.0 |