CVE-2025-6021Libxml2: 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.
What to do
Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 24.04 | libxml2 | Fixed | 2.9.14+dfsg-1.3ubuntu3.4 | UBUNTU-CVE-2025-6021 |
| Ubuntu 22.04 | libxml2 | Fixed | 2.9.13+dfsg-1ubuntu0.8 | UBUNTU-CVE-2025-6021 |
| Ubuntu 20.04 | libxml2 | Fix pending | 2.9.10+dfsg-5ubuntu0.20.04.10+esm1 (Ubuntu Pro) | UBUNTU-CVE-2025-6021 |
| Ubuntu 18.04 | libxml2 | Fix pending | 2.9.4+dfsg1-6.1ubuntu1.9+esm4 (Ubuntu Pro) | UBUNTU-CVE-2025-6021 |
| Ubuntu 16.04 | libxml2 | Fix pending | 2.9.3+dfsg1-1ubuntu0.7+esm9 (Ubuntu Pro) | UBUNTU-CVE-2025-6021 |
| Ubuntu 14.04 | libxml2 | Fix pending | 2.9.1+dfsg1-3ubuntu4.13+esm8 (Ubuntu Pro) | UBUNTU-CVE-2025-6021 |
| Debian 14 | libxml2 | Fixed | 2.12.7+dfsg+really2.9.14-2 | DEBIAN-CVE-2025-6021 |
| Debian 13 | libxml2 | Fixed | 2.12.7+dfsg+really2.9.14-2 | DEBIAN-CVE-2025-6021 |
| Debian 12 | libxml2 | Fixed | 2.9.14+dfsg-1.3~deb12u3 | DEBIAN-CVE-2025-6021 |
| Red Hat Enterprise Linux 10 | libxml2 | Fixed | 0:2.12.5-7.el10_0 | RHSA-2025:10630 |
| Red Hat Enterprise Linux 10 | libxml2-devel | Fixed | 0:2.12.5-7.el10_0 | RHSA-2025:10630 |
| Red Hat Enterprise Linux 10 | libxml2-static | Fixed | 0:2.12.5-7.el10_0 | RHSA-2025:10630 |
| Red Hat Enterprise Linux 10 | python3-libxml2 | Fixed | 0:2.12.5-7.el10_0 | RHSA-2025:10630 |
| Red Hat Enterprise Linux 9 | libxml2 | Fixed | 0:2.9.13-10.el9_6 | RHSA-2025:10699 |
| Red Hat Enterprise Linux 9 | libxml2-devel | Fixed | 0:2.9.13-10.el9_6 | RHSA-2025:10699 |
| Red Hat Enterprise Linux 9 | python3-libxml2 | Fixed | 0:2.9.13-10.el9_6 | RHSA-2025:10699 |
| Red Hat Enterprise Linux 8 | libxml2 | Fixed | 0:2.9.7-21.el8_10.1 | RHSA-2025:10698 |
| Red Hat Enterprise Linux 8 | libxml2-devel | Fixed | 0:2.9.7-21.el8_10.1 | RHSA-2025:10698 |
| Red Hat Enterprise Linux 8 | python3-libxml2 | Fixed | 0:2.9.7-21.el8_10.1 | RHSA-2025:10698 |
| Red Hat Enterprise Linux 6 | libxml2 | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | libxml2-devel | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | libxml2-python | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | libxml2-static | Will not fix Out of support scope | ||
| AlmaLinux 10 | libxml2 | Fixed | 2.12.5-7.el10_0 | ALSA-2025:10630 |
| AlmaLinux 10 | libxml2-devel | Fixed | 2.12.5-7.el10_0 | ALSA-2025:10630 |
| AlmaLinux 10 | libxml2-static | Fixed | 2.12.5-7.el10_0 | ALSA-2025:10630 |
| AlmaLinux 10 | python3-libxml2 | Fixed | 2.12.5-7.el10_0 | ALSA-2025:10630 |
| AlmaLinux 9 | libxml2 | Fixed | 2.9.13-10.el9_6 | ALSA-2025:10699 |
| AlmaLinux 9 | libxml2-devel | Fixed | 2.9.13-10.el9_6 | ALSA-2025:10699 |
| AlmaLinux 9 | python3-libxml2 | Fixed | 2.9.13-10.el9_6 | ALSA-2025:10699 |
| AlmaLinux 8 | libxml2 | Fixed | 2.9.7-21.el8_10.1 | ALSA-2025:10698 |
| AlmaLinux 8 | libxml2-devel | Fixed | 2.9.7-21.el8_10.1 | ALSA-2025:10698 |
| AlmaLinux 8 | python3-libxml2 | Fixed | 2.9.7-21.el8_10.1 | ALSA-2025:10698 |
| Rocky Linux 10 | libxml2 | Fixed | 0:2.12.5-7.el10_0 | RLSA-2025:10630 |
| Rocky Linux 9 | libxml2 | Fixed | 0:2.9.13-10.el9_6 | RLSA-2025:10699 |
| Rocky Linux 8 | libxml2 | Fixed | 0:2.9.7-21.el8_10.1 | RLSA-2025:10698 |
| Alpine Linux 3.24 | libxml2 | Fixed | 2.13.9-r0 | ALPINE-CVE-2025-6021 |
| Alpine Linux 3.23 | libxml2 | Fixed | 2.13.9-r0 | ALPINE-CVE-2025-6021 |
| Alpine Linux 3.22 | libxml2 | Fixed | 2.13.9-r0 | ALPINE-CVE-2025-6021 |
| Alpine Linux 3.22 | qt6-qtwebengine | Fixed | 6.8.3-r5 | ALPINE-CVE-2025-6021 |
| Alpine Linux 3.21 | libxml2 | Fixed | 2.13.9-r0 | ALPINE-CVE-2025-6021 |
What the vendor says
As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- libxml2: affected: before 2.14.4; fixed in
2.14.4 - Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 7 Extended Lifecycle Support
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 8.2 Advanced Update Support
- Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support
- Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On
- Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support
- Red Hat Enterprise Linux 8.6 Telecommunications Update Service
- Red Hat Enterprise Linux 8.6 Update Services for SAP Solutions
- Red Hat Enterprise Linux 8.8 Telecommunications Update Service
- Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions
Workaround: Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability. Users are strongly advised to apply vendor-supplied patches as soon as they become available to address the underlying integer overflow flaw in the affected code.
Vendor advisories:
- https://access.redhat.com/errata/RHSA-2025:10630 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2025:10698 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2025:10699 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2025:11580 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2025:11673 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2025:12098 (vendor-advisory)
References
- https://access.redhat.com/errata/RHSA-2025:10630
- https://access.redhat.com/errata/RHSA-2025:10698
- https://access.redhat.com/errata/RHSA-2025:10699
- https://access.redhat.com/errata/RHSA-2025:11580
- https://access.redhat.com/errata/RHSA-2025:11673
- https://access.redhat.com/errata/RHSA-2025:12098
- https://access.redhat.com/errata/RHSA-2025:12099
- https://access.redhat.com/errata/RHSA-2025:12199
- https://access.redhat.com/errata/RHSA-2025:12237
- https://access.redhat.com/errata/RHSA-2025:12239
- https://access.redhat.com/errata/RHSA-2025:12240
- https://access.redhat.com/errata/RHSA-2025:12241
- https://access.redhat.com/errata/RHSA-2025:13267
- https://access.redhat.com/errata/RHSA-2025:13289
- https://access.redhat.com/errata/RHSA-2025:13325
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.