CVE-2025-24928
NoneCVSS
—
EPSS
0.4%
Published
Feb 18, 2025
CISA due date
—
Cloudanix analysis
A flaw in a widely used library for reading XML files can let attackers crash or take control of programs that process untrusted documents when a specific validation feature is turned on.
- Exploitation
- Other
- Attacker needs
- User Interaction
- Complexity
- Moderate
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Stack-based buffer overflow in xmlSnprintfElements within valid.c when performing DTD validation on an untrusted XML document or DTD.
Why it matters to the business
Applications that parse untrusted XML with DTD validation enabled may crash or allow arbitrary code execution, disrupting services that rely on libxml2 for document processing.
How an attack unfolds
An attacker crafts a malicious XML document containing a specially formed DTD and supplies it to an application that invokes DTD validation; this triggers the overflow in xmlSnprintfElements during validation, leading to memory corruption that can be leveraged for code execution.
How to fix it
Upgrade libxml2 to version 2.12.10 or 2.13.6 or later; apply commit 02d577715e1951cf114ca4e9adaf5605156c4f4c; Android devices should receive the SoCVersion update dated 2023-01-05.
How to confirm the fix worked
Verify installed libxml2 version against fixed releases; test parsing of crafted malicious DTD documents to confirm the overflow no longer occurs.
Typical attack path
- Deliver untrusted XML containing a crafted DTD to the target application
- Ensure DTD validation is triggered during parsing
- Trigger stack buffer overflow in xmlSnprintfElements
- Exploit resulting memory corruption for code execution or denial of service
How to detect it
Review application logs for crashes or segmentation faults during XML parsing that involves DTD validation; inspect inbound XML documents for unusual or oversized DTD constructs.
What your security team should do
- Identify all applications and libraries using vulnerable libxml2 versions and schedule immediate upgrades
- Disable DTD validation for untrusted XML where feasible until patches are applied
- Monitor EPSS and exploit maturity trends for any change in risk posture
The record
libxml2 before 2.12.10 and 2.13.x before 2.13.6 has a stack-based buffer overflow in xmlSnprintfElements in valid.c. To exploit this, DTD validation must occur for an untrusted document or untrusted DTD. NOTE: this is similar to CVE-2017-9047.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:8 | libxml2 | 0 | 2.9.7-19.el8_10 |
| AlmaLinux:8 | libxml2-devel | 0 | 2.9.7-19.el8_10 |
| AlmaLinux:8 | python3-libxml2 | 0 | 2.9.7-19.el8_10 |
| AlmaLinux:9 | libxml2 | 0 | 2.9.13-6.el9_5.2 |
| AlmaLinux:9 | libxml2-devel | 0 | 2.9.13-6.el9_5.2 |
| AlmaLinux:9 | python3-libxml2 | 0 | 2.9.13-6.el9_5.2 |
| Alpine:v3.18 | libxml2 | 0 | 2.13.4-r4 |
| Alpine:v3.19 | libxml2 | 0 | 2.11.8-r1 |
| Alpine:v3.20 | libxml2 | 0 | 2.12.7-r1 |
| Alpine:v3.21 | libxml2 | 0 | 2.13.4-r4 |
| Alpine:v3.22 | libxml2 | 0 | 2.13.6-r0 |
| Chainguard | openjdk-11-openj9 | 0 | 0.53.0-r0 |
| Chainguard | openjdk-11-openj9-dbg | 0 | 0.53.0-r0 |
| Chainguard | openjdk-11-openj9-default-jdk | 0 | 0.53.0-r0 |
| Chainguard | openjdk-11-openj9-default-jvm | 0 | 0.53.0-r0 |
| Chainguard | openjdk-11-openj9-default-policy | 0 | 0.53.0-r0 |
| Chainguard | openjdk-11-openj9-doc | 0 | 0.53.0-r0 |
| Chainguard | openjdk-11-openj9-jmods | 0 | 0.53.0-r0 |
| Chainguard | openjdk-11-openj9-jre | 0 | 0.53.0-r0 |
| Chainguard | openjdk-17-openj9 | 0 | 0.53.0-r0 |
| Chainguard | openjdk-17-openj9-dbg | 0 | 0.53.0-r0 |
| Chainguard | openjdk-17-openj9-default-jdk | 0 | 0.53.0-r0 |
| Chainguard | openjdk-17-openj9-default-jvm | 0 | 0.53.0-r0 |
| Chainguard | openjdk-17-openj9-default-policy | 0 | 0.53.0-r0 |
| Chainguard | openjdk-17-openj9-doc | 0 | 0.53.0-r0 |
| Chainguard | openjdk-17-openj9-jmods | 0 | 0.53.0-r0 |
| Chainguard | openjdk-17-openj9-jre | 0 | 0.53.0-r0 |
| Chainguard | openjdk-21-openj9 | 0 | 0.53.0-r0 |
| Chainguard | openjdk-21-openj9-dbg | 0 | 0.53.0-r0 |
| Chainguard | openjdk-21-openj9-default-jdk | 0 | 0.53.0-r0 |
| Chainguard | openjdk-21-openj9-default-jvm | 0 | 0.53.0-r0 |
| Chainguard | openjdk-21-openj9-default-policy | 0 | 0.53.0-r0 |
| Chainguard | openjdk-21-openj9-doc | 0 | 0.53.0-r0 |
| Chainguard | openjdk-21-openj9-jmods | 0 | 0.53.0-r0 |
| Chainguard | openjdk-21-openj9-jre | 0 | 0.53.0-r0 |
| Chainguard | openjdk-8-openj9 | 0 | 0.53.0-r1 |
| Chainguard | openjdk-8-openj9-dbg | 0 | 0.53.0-r1 |
| Chainguard | openjdk-8-openj9-default-jdk | 0 | 0.53.0-r1 |
| Chainguard | openjdk-8-openj9-default-jvm | 0 | 0.53.0-r1 |
| Chainguard | openjdk-8-openj9-doc | 0 | 0.53.0-r1 |
| Chainguard | openjdk-8-openj9-jre | 0 | 0.53.0-r1 |
| Debian:11 | libxml2 | 0 | No fix |
| Debian:11 | libxml2 | 0 | 2.9.10+dfsg-6.7+deb11u6 |
| Debian:12 | libxml2 | 0 | No fix |
| Debian:13 | libxml2 | 0 | No fix |
| Debian:13 | libxml2 | 0 | 2.12.7+dfsg+really2.9.14-0.4 |
| Debian:14 | libxml2 | 0 | 2.12.7+dfsg+really2.9.14-0.4 |
| Mageia:9 | libxml2 | 0 | 2.10.4-1.6.mga9 |
| SUSE:Enterprise Storage 7.1 | libxml2 | 0 | 2.9.7-150000.3.76.1 |
| SUSE:Enterprise Storage 7.1 | python-libxml2-python | 0 | 2.9.7-150000.3.76.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | libxml2 | 0 | 2.9.7-150000.3.76.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | python-libxml2-python | 0 | 2.9.7-150000.3.76.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | libxml2 | 0 | 2.9.14-150400.5.38.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | libxml2-python | 0 | 2.9.14-150400.5.38.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | libxml2 | 0 | 2.9.14-150400.5.38.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | libxml2-python | 0 | 2.9.14-150400.5.38.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | libxml2 | 0 | 2.10.3-150500.5.23.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | libxml2-python | 0 | 2.10.3-150500.5.23.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS | libxml2 | 0 | 2.10.3-150500.5.23.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS | libxml2-python | 0 | 2.10.3-150500.5.23.1 |
| SUSE:Linux Enterprise Micro 5.1 | libxml2 | 0 | 2.9.7-150000.3.76.1 |
| SUSE:Linux Enterprise Micro 5.2 | libxml2 | 0 | 2.9.7-150000.3.76.1 |
| SUSE:Linux Enterprise Micro 5.2 | python-libxml2-python | 0 | 2.9.7-150000.3.76.1 |
| SUSE:Linux Enterprise Micro 5.3 | libxml2 | 0 | 2.9.14-150400.5.38.1 |
| SUSE:Linux Enterprise Micro 5.3 | libxml2-python | 0 | 2.9.14-150400.5.38.1 |
| SUSE:Linux Enterprise Micro 5.4 | libxml2 | 0 | 2.9.14-150400.5.38.1 |
| SUSE:Linux Enterprise Micro 5.4 | libxml2-python | 0 | 2.9.14-150400.5.38.1 |
| SUSE:Linux Enterprise Micro 5.5 | libxml2 | 0 | 2.10.3-150500.5.23.1 |
| SUSE:Linux Enterprise Micro 5.5 | libxml2-python | 0 | 2.10.3-150500.5.23.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | libxml2 | 0 | 2.10.3-150500.5.23.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | libxml2-python | 0 | 2.10.3-150500.5.23.1 |
| SUSE:Linux Enterprise Module for Python 3 15 SP6 | libxml2-python | 0 | 2.10.3-150500.5.23.1 |
| SUSE:Linux Enterprise Server 12 SP5-LTSS | libxml2 | 0 | 2.9.4-46.81.1 |
| SUSE:Linux Enterprise Server 12 SP5-LTSS | python-libxml2 | 0 | 2.9.4-46.81.1 |
| SUSE:Linux Enterprise Server 15 SP3-LTSS | libxml2 | 0 | 2.9.7-150000.3.76.1 |
| SUSE:Linux Enterprise Server 15 SP3-LTSS | python-libxml2-python | 0 | 2.9.7-150000.3.76.1 |
| SUSE:Linux Enterprise Server 15 SP4-LTSS | libxml2 | 0 | 2.9.14-150400.5.38.1 |
| SUSE:Linux Enterprise Server 15 SP4-LTSS | libxml2-python | 0 | 2.9.14-150400.5.38.1 |
| SUSE:Linux Enterprise Server 15 SP5-LTSS | libxml2 | 0 | 2.10.3-150500.5.23.1 |
| SUSE:Linux Enterprise Server 15 SP5-LTSS | libxml2-python | 0 | 2.10.3-150500.5.23.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | libxml2 | 0 | 2.9.4-46.81.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | python-libxml2 | 0 | 2.9.4-46.81.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | libxml2 | 0 | 2.9.7-150000.3.76.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | python-libxml2-python | 0 | 2.9.7-150000.3.76.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | libxml2 | 0 | 2.9.14-150400.5.38.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | libxml2-python | 0 | 2.9.14-150400.5.38.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP5 | libxml2 | 0 | 2.10.3-150500.5.23.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP5 | libxml2-python | 0 | 2.10.3-150500.5.23.1 |
| SUSE:Manager Proxy 4.3 | libxml2 | 0 | 2.9.14-150400.5.38.1 |
| SUSE:Manager Proxy 4.3 | libxml2-python | 0 | 2.9.14-150400.5.38.1 |
| SUSE:Manager Server 4.3 | libxml2 | 0 | 2.9.14-150400.5.38.1 |
| SUSE:Manager Server 4.3 | libxml2-python | 0 | 2.9.14-150400.5.38.1 |
| openSUSE:Leap 15.6 | libxml2 | 0 | 2.10.3-150500.5.23.1 |
| openSUSE:Leap 15.6 | libxml2-python | 0 | 2.10.3-150500.5.23.1 |
| openSUSE:Leap 15.6 | python-libxml2-python | 0 | 2.9.7-150000.3.76.1 |
| openSUSE:Tumbleweed | libxml2 | 0 | 2.13.6-1.1 |
| openSUSE:Tumbleweed | python-lxml | 0 | 5.3.2-1.1 |
Related vulnerabilities
- CVE-2025-7425 A flaw was found in libxslt where the attribute type, atype, flags are modified in a way… Also affects libxml2
- CVE-2025-49796 A vulnerability was found in libxml2. Also affects libxml2
- CVE-2025-49794 A use-after-free vulnerability was found in libxml2. Also affects libxml2
- CVE-2025-6021 A flaw was found in libxml2's xmlBuildQName function, where integer overflows in buffer… Also affects libxml2
- CVE-2025-32415 In libxml2 before 2.13.8 and 2.14.x before 2.14.2, xmlSchemaIDCFillNodeTables in… Also affects libxml2
- CVE-2025-32414 In libxml2 before 2.13.8 and 2.14.x before 2.14.2, out-of-bounds memory access can occur… Also affects libxml2
- CVE-2024-56171 libxml2 before 2.12.10 and 2.13.x before 2.13.6 has a use-after-free in… Also affects libxml2
- CVE-2025-9714 Uncontrolled recursion in XPath evaluation in libxml2 up to and including version 2.9.14… Also affects libxml2