XML Entity Expansion Vulnerability in Expat Package

expat Updated 02 Oct 2025

Summary

10/03/2024
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2024-28757: libexpat through 2.6.1 allows an XML Entity Expansion attack when there is isolated use of external parsers (created via XML_ExternalEntityParserCreate). Affects expat versions < 2.6.1-2. Fixed in 2.6.1-2. 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

Expat is an XML parser library written in C, designed to provide a fast and efficient way to parse XML documents. It is widely used in various applications due to its lightweight nature and ease of integration. However, the library has been found to be vulnerable to an XML Entity Expansion attack, particularly when external parsers are used in isolation. This vulnerability can lead to denial of service or other unintended consequences if exploited.

Vulnerability Detail

The vulnerability identified as DEBIAN-CVE-2024-28757 affects libexpat versions up to 2.6.1. It allows attackers to perform XML Entity Expansion attacks when external parsers are created using the XML_ExternalEntityParserCreate function. This can lead to excessive memory consumption and potential denial of service, as the parser may attempt to process an unbounded number of entities, overwhelming system resources.

How To Fix

Minimum fixed version

2.6.1-2

This is the first release that contains the fix.

sudo apt-get install --only-upgrade expat

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

Workaround

As a temporary workaround, avoid using external parsers created via XML_ExternalEntityParserCreate until the package is updated. This can help mitigate the risk of exploitation while waiting for a proper fix.

Conclusion

The Expat package has a critical vulnerability that can lead to serious issues if not addressed. It is essential to update to the patched version 2.6.1-2 to protect your systems. Additionally, users should consider using workarounds until they can apply the necessary updates.

See every vulnerability recorded for expat →

Share this vulnerability

FAQ

The vulnerability is an XML Entity Expansion attack that can lead to denial of service due to excessive resource consumption.

The vulnerability affects Expat versions up to 2.6.1.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.

If an immediate update is not possible, avoid using external parsers created via XML_ExternalEntityParserCreate as a temporary workaround.

For more information on vulnerabilities, you can visit Vulert, which monitors and alerts for open-source vulnerabilities in real-time.

Related vulnerabilities

Recent vulnerabilities recorded for expat.

How To Fix

Minimum fixed version

2.6.1-2

This is the first release that contains the fix.

sudo apt-get install --only-upgrade expat

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