
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2025-6021 is an integer overflow vulnerability in libxml2's xmlBuildQName() function that leads to a stack-based buffer overflow. The flaw arises from unsafe arithmetic when concatenating XML namespace prefix and local name components: the lengths, originally of type size_t, are cast to int, causing incorrect size calculations for large values. This can result in a memcpy with an extremely large size argument, triggering a stack buffer overflow and potential memory corruption or denial of service. All libxml2 versions before 2.14.4 are affected, along with downstream products including Red Hat Enterprise Linux 7–10, Red Hat OpenShift Container Platform 4.12–4.19, Red Hat JBoss Core Services, and IBM Rapid Infrastructure Automation. The vulnerability was published on June 12, 2025, and carries a CVSS v3.1 base score of 7.5 (High) (Red Hat CVE, Red Hat Bugzilla).
The root cause is an integer overflow (CWE-190) in the xmlBuildQName() function within libxml2, which also leads to a stack-based buffer overflow (CWE-121) and out-of-bounds write (CWE-787). When constructing a qualified XML name by concatenating a namespace prefix and a local name, the function performs arithmetic on the string lengths using size_t values that are subsequently cast to int. For sufficiently large prefix or local name lengths, this cast causes integer wraparound, resulting in an undersized buffer allocation and a subsequent memcpy that writes far beyond the allocated stack buffer. The vulnerability is network-exploitable with no authentication or user interaction required — an attacker only needs to supply crafted XML content to an application that uses libxml2 for parsing. A proof-of-concept issue was filed on the GNOME GitLab tracker (GNOME GitLab, Red Hat Bugzilla).
Successful exploitation primarily results in denial of service through application crash due to memory corruption caused by the stack buffer overflow. In more complex scenarios, the out-of-bounds write could theoretically be leveraged for remote code execution, though this has not been demonstrated publicly. Because libxml2 is a widely embedded XML parsing library used in web servers, middleware, container platforms, and ICS/OT systems, the blast radius is broad — any internet-facing application that processes attacker-controlled XML is potentially at risk. Affected downstream products include Red Hat Enterprise Linux, OpenShift Container Platform, JBoss Core Services, IBM Rapid Infrastructure Automation, Hitachi Energy RTU500, SteamOS, and many Linux distributions (Red Hat CVE, CISA ICS Advisory).
A proof-of-concept issue demonstrating the vulnerability is publicly available on the GNOME GitLab issue tracker, but no weaponized exploit or in-the-wild exploitation has been reported as of the time of this report (GNOME GitLab). The EPSS score is approximately 0.04%, indicating a low current probability of exploitation in the wild. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. No threat actor attribution has been identified. The vulnerability is detectable by multiple commercial scanners including Qualys and Nessus, which have published numerous detection plugins.
int inside xmlBuildQName().xmlBuildQName() function computes an incorrect (wrapped) buffer size due to the integer overflow, allocates an undersized stack buffer, and then performs a memcpy with the original large size, overwriting adjacent stack memory.SIGSEGV) or stack smashing errors in application logs; error messages referencing xmlBuildQName in stack traces.core.*) generated in application working directories following crashes of libxml2-linked processes.The primary remediation is to upgrade libxml2 to version 2.14.4 or later, which contains the fix for this vulnerability (GNOME GitLab). Red Hat has issued security advisories for all affected RHEL versions: RHSA-2025:10630 (RHEL 10), RHSA-2025:10698 (RHEL 8), RHSA-2025:10699 (RHEL 9), and numerous additional advisories for extended update support streams, OpenShift Container Platform versions 4.12–4.19, and JBoss Core Services (RHSA-2025:10630, RHSA-2025:10698, RHSA-2025:10699). Slackware, Debian LTS, SUSE, Ubuntu, Oracle Linux, AlmaLinux, Amazon Linux 2, and Mageia have also released updated packages. As a workaround where patching is not immediately possible, restrict XML processing to trusted sources and implement input validation to reject XML documents with excessively long namespace prefixes or local names.
Red Hat rated this vulnerability as "Important" severity and issued a broad set of security advisories covering RHEL 7 through 10, multiple OpenShift Container Platform versions, and JBoss Core Services, reflecting the wide deployment of libxml2 across their product portfolio (Red Hat Bugzilla). CISA published an ICS advisory (ICSA-25-259-02) noting the impact on Hitachi Energy RTU500 industrial control systems, highlighting the vulnerability's reach into OT environments (CISA ICS Advisory). The vulnerability also affected SteamOS 3.7.15, which was patched and noted in gaming community coverage. General community coverage was broad but routine, with no significant controversy or notable researcher commentary beyond standard patch advisories.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."