Critical Memory Allocation Vulnerability in Expat XML Parsing Library

expat Updated 21 Nov 2025

Summary

19/11/2025
N/A
Yes i
Unrated
Not published

ALSA-2025:21776: Important: expat security update. Affects expat versions < 2.5.0-1.el8_10. Fixed in 2.5.0-1.el8_10. 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 a widely-used C library designed for parsing XML documents efficiently. It is known for its speed and flexibility, making it a popular choice for software developers working with XML data. However, it has been identified that certain versions of Expat are vulnerable to a security issue that allows attackers to exploit memory allocation processes, potentially leading to denial of service or other malicious activities.

Vulnerability Detail

The vulnerability, identified as CVE-2025-59375, arises from the libexpat component of the Expat library. Attackers can trigger large dynamic memory allocations by submitting a small XML document for parsing. This can lead to excessive memory consumption, resulting in application crashes or degraded performance. The issue is particularly concerning as it can be exploited with minimal input, making it a low-barrier attack vector for malicious actors.

How To Fix

Minimum fixed version

2.5.0-1.el8_10

This is the first release that contains the fix.

sudo dnf update expat

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

Workaround

As a temporary measure, users can limit the size of XML documents that are parsed by the Expat library. This can be done by implementing checks in the application code to reject documents that exceed a certain size threshold, thus mitigating the risk of memory allocation attacks.

Conclusion

The Expat XML parsing library has a critical vulnerability that can be exploited through memory allocation attacks. It is crucial for users to update to the latest patched version to safeguard their applications. Implementing temporary workarounds can help mitigate risks until the update is applied.

See every vulnerability recorded for expat →

Share this vulnerability

FAQ

CVE-2025-59375 is a security vulnerability in the Expat XML parsing library that allows attackers to exploit memory allocation processes through small XML documents.

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

The vulnerability can lead to denial of service, application crashes, or performance degradation due to excessive memory consumption.

Yes, a patch is available in version 2.5.0-1.el8_10 of the Expat library. Users should update to this version or later.

If an immediate update is not possible, implement size checks on XML documents being parsed to limit the risk of exploitation.

Related vulnerabilities

Recent vulnerabilities recorded for expat.

How To Fix

Minimum fixed version

2.5.0-1.el8_10

This is the first release that contains the fix.

sudo dnf update 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