CVE-2025-6021 Libxml2: integer overflow in xmlbuildqname() leads to stack buffer overflow in libxml2

High 7.5 Published Updated

Integer overflow in libxml2's xmlBuildQName function causes stack buffer overflow, allowing attackers to execute code or crash applications via crafted input.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-6021?

CVE-2025-6021 is a high-severity vulnerability in Redhat Enterprise Linux, published on 12 Jun 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

A flaw was found in libxml2's xmlBuildQName function, where integer overflows in buffer size calculations can lead to a stack-based buffer overflow. This issue can result in memory corruption or a denial of service when processing crafted input.

Weakness: CWE-787

Which versions are affected by CVE-2025-6021?

3 open source packages ship an affected version, including java, java-min and jre. It affects 20 products.

PackageAffectedFixed in
java BitnamiAll versions1.8.0, 8.0.481
java-min BitnamiAll versions1.8.0, 8.0.481
jre BitnamiAll versions1.8.0, 8.0.481

Products include Redhat Enterprise Linux, Redhat Enterprise Linux Eus, Redhat Enterprise Linux for Arm 64, Redhat Enterprise Linux for Arm 64 Eus, Redhat Enterprise Linux for Ibm Z Systems, Redhat Enterprise Linux for Ibm Z Systems Eus and 14 more.

How do I fix CVE-2025-6021?

Upgrade java to a fixed version for your release line: 1.8.0 or 8.0.481.

Is CVE-2025-6021 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-6021 exists.

All Redhat Enterprise Linux vulnerabilities

Sources

Also known as ALPINE-CVE-2025-6021, AZL-64101, AZL-64124, BELL-CVE-2025-6021, BIT-java-2025-6021, BIT-java-min-2025-6021 and 18 more.

Is CVE-2025-6021 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free