Stack Overflow in libxml2 xmlBuildQName (CVE-2025-6021)
CVE-2025-6021 Published on June 12, 2025
Libxml2: integer overflow in xmlbuildqname() leads to stack buffer overflow in libxml2
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.
Vulnerability Analysis
CVE-2025-6021 can be exploited with network access, and does not require authorization privileges or user interaction. This vulnerability is considered to have a low attack complexity. An automatable proof of concept (POC) exploit exists. The potential impact of an exploit of this vulnerability is considered to have no impact on confidentiality and integrity, and a high impact on availability.
Timeline
Reported to Red Hat.
Made public.
Weakness Type
What is a Memory Corruption Vulnerability?
The software writes data past the end, or before the beginning, of the intended buffer. Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
CVE-2025-6021 has been classified to as a Memory Corruption vulnerability or weakness.
Products Associated with CVE-2025-6021
You can be notified by email with stack.watch whenever vulnerabilities like CVE-2025-6021 are published in these products:
Vulnerable Packages
The following package name and versions may be associated with CVE-2025-6021
| Package Manager | Vulnerable Package | Versions | Fixed In |
|---|---|---|---|
| rubygems | nokogiri | < 1.18.9 | 1.18.9 |
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.