CVE-2024-56171
NoneCVSS
—
EPSS
1.2%
Published
Feb 18, 2025
CISA due date
—
Cloudanix analysis
A flaw in a widely used library for handling XML data can let attackers crash programs or potentially take control of systems that process specially crafted files.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Moderate
- Impact
- Full Compromise
- Component
- Library
- Class
- Use After Free
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Use-after-free condition in xmlSchemaIDCFillNodeTables and xmlSchemaBubbleIDCNodeTables during XML schema identity constraint processing allows invalid memory access when a crafted document or schema is validated.
Why it matters to the business
Applications relying on libxml2 for XML handling may experience crashes, unpredictable behavior, or remote code execution, resulting in service outages, data exposure, or full system compromise.
How an attack unfolds
An attacker supplies a specially constructed XML document or schema containing identity constraints that trigger the use-after-free during validation; successful exploitation can lead to memory corruption and arbitrary code execution.
How to fix it
Upgrade libxml2 to a build containing commit 02d577715e1951cf114ca4e9adaf5605156c4f4c or later releases 2.12.10 and 2.13.6; recompile dependent applications against the patched library and test schema validation functionality.
How to confirm the fix worked
Confirm the installed libxml2 version meets or exceeds the fixed commit; run regression tests using schema validation with identity constraints and monitor for crashes or sanitizer reports on crafted inputs.
Typical attack path
- Identify a target application that parses untrusted XML against an XML schema
- Craft an XML document or schema that exercises the vulnerable identity constraint paths
- Submit the malicious input to the application
- Trigger validation to activate the use-after-free
- Leverage resulting memory corruption for code execution or denial of service
How to detect it
Review application logs for unexpected crashes or segmentation faults during XML schema validation; inspect process memory dumps or sanitizer output for use-after-free patterns on schema processing paths.
What your security team should do
- Prioritize patching libxml2 in all environments that perform XML schema validation
- Inventory applications and libraries that statically or dynamically link libxml2
- Implement input validation or sandboxing around XML processing until patches are applied
- Monitor vulnerability feeds for downstream package updates that incorporate the fix
The record
libxml2 before 2.12.10 and 2.13.x before 2.13.6 has a use-after-free in xmlSchemaIDCFillNodeTables and xmlSchemaBubbleIDCNodeTables in xmlschemas.c. To exploit this, a crafted XML document must be validated against an XML schema with certain identity constraints, or a crafted XML schema must be used.
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 |
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-2025-24928 libxml2 before 2.12.10 and 2.13.x before 2.13.6 has a stack-based buffer overflow 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