CVE-2024-1455: LangChain's XMLOutputParser vulnerable to XML Entity Expansion

langchain-core Updated 02 Oct 2025

Summary

26/03/2024
Yes i
Moderate
5.9

CVE-2024-1455: LangChain's XMLOutputParser vulnerable to XML Entity Expansion. Affects langchain-core versions < 0.1.35. Fixed in 0.1.35. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

LangChain is a package available on PyPI that provides functionality for XML parsing and manipulation. It includes the XMLOutputParser component, which utilizes the etree module from the XML parser in the standard Python library. This module has known vulnerabilities related to XML parsing. More information about these vulnerabilities can be found in the Python documentation (https://docs.python.org/3/library/xml.html). The vulnerability primarily affects users who combine an LLM (or agent) with the XMLOutputParser and expose the component via an endpoint on a web service.

Vulnerability Detail

The XMLOutputParser in LangChain is vulnerable to XML Entity Expansion. This vulnerability allows an attacker to manipulate the LLM or input data to produce a malicious payload for the parser. By exploiting this vulnerability, an attacker can compromise the availability of the service. To successfully exploit the vulnerability, the following conditions must be met: 1. The XMLOutputParser is being used. 2. Malicious input is passed into the XMLOutputParser directly or by manipulating an LLM. 3. The component is exposed via a web service.

How To Fix

Latest published version: 1.7.0 as of 22 Oct 2026

pip install --upgrade "langchain-core==1.7.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.1.35

This is the first release that contains the fix.

pip install --upgrade "langchain-core==0.1.35"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is necessary to update the LangChain package to the fixed version to mitigate the risk.

Conclusion

In conclusion, LangChain's XMLOutputParser is vulnerable to XML Entity Expansion, which can be exploited to compromise the availability of a service. To mitigate this vulnerability, it is recommended to update the LangChain package to version 0.1.34 or later. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for langchain-core →

Share this vulnerability

FAQ

LangChain is a package available on PyPI that provides functionality for XML parsing and manipulation.

XMLOutputParser is a component in LangChain that utilizes the etree module from the XML parser in the standard Python library.

XML Entity Expansion is a vulnerability that allows an attacker to manipulate XML input to cause excessive memory consumption and potential denial of service.

This vulnerability can be exploited by passing malicious input into the XMLOutputParser, either directly or by manipulating an LLM (or agent) to do so.

The impact of this vulnerability is the potential compromise of the availability of the service that uses LangChain and XMLOutputParser.

Related vulnerabilities

Recent vulnerabilities recorded for langchain-core.

How To Fix

Latest published version: 1.7.0 as of 22 Oct 2026

pip install --upgrade "langchain-core==1.7.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.1.35

This is the first release that contains the fix.

pip install --upgrade "langchain-core==0.1.35"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback