CVE-2024-1455: Billion Laughs Attack leading to DoS in langchain-ai/langchain

Published Mar 26, 2024
·
Updated

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).

Other sources

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

Affected Software

2 affected componentsFixes available
pip/langchain-core<0.1.35
0.1.35
Langchain Langchain>=0.1.4<=0.1.35

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/langchain-core to a version that resolves this vulnerability.

    Fixed in 0.1.35

Event History

Mar 26, 2024
CVE Published
via MITRE·02:03 PM
Data Sourced
via MITRE·02:03 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Advisory Published
via GitHub·03:30 PM

Frequently Asked Questions

1

What is the severity of CVE-2024-1455?

CVE-2024-1455 has been assigned a high severity rating due to the potential for a Billion Laughs Attack that can exhaust system resources.

2

How do I fix CVE-2024-1455?

To fix CVE-2024-1455, update the langchain-core package to version 0.1.34 or later.

3

What is a Billion Laughs Attack in CVE-2024-1455?

A Billion Laughs Attack is an XML external entity attack that exploits XML parsers by using nested entities to inflate resource consumption.

4

Which software is affected by CVE-2024-1455?

CVE-2024-1455 affects the langchain-core package prior to version 0.1.34.

5

How can attackers exploit CVE-2024-1455?

Attackers can exploit CVE-2024-1455 by crafting XML documents with nested entities to overwhelm the XML parser and cause denial of service.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203