CVE-2025-49794
Critical · 9.1CVSS
9.1
EPSS
0.8%
Published
Jun 16, 2025
CISA due date
—
Cloudanix analysis
A bug in a widely used library that reads certain data files can make programs crash when they receive a specially made file, interrupting normal operations.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Use After Free
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Use-after-free during XPath element parsing in libxml2 when XML schematron contains <sch:name path="..."/> elements, resulting in memory corruption that can crash the process or trigger other undefined behavior.
Why it matters to the business
Applications that parse untrusted XML documents may experience crashes or data corruption, causing service outages; the issue affects a widely used library but has not been observed in active exploitation campaigns.
How an attack unfolds
An attacker creates a malicious XML document embedding a schematron schema with a crafted <sch:name path="..."/> element, then supplies the document to any application using the vulnerable libxml2 parser, causing the use-after-free during XPath processing.
How to fix it
Upgrade python-pillow on Mageia 5 to version 2.6.2-2.5.mga5 or later; rebuild or reinstall any dependent packages that ship the vulnerable libxml2 integration.
How to confirm the fix worked
Verify the installed python-pillow package version meets or exceeds the fixed release; attempt to parse a test XML document containing the triggering schematron construct and confirm absence of crashes.
Typical attack path
- Craft malicious XML containing a schematron <sch:name path="..."/> element
- Deliver the XML to a target application that uses libxml2 for parsing
- Trigger XPath processing under the specific schematron conditions
- Induce use-after-free leading to crash or undefined behavior
How to detect it
Review application and system logs for unexpected crashes or segmentation faults during XML or schematron processing; correlate with file uploads or parsing events around the time of the crash.
What your security team should do
- Apply the listed package update across all affected systems
- Scan for and replace any older python-pillow or libxml2 builds
- Add XML parsing crash monitoring to existing alerting
The record
A use-after-free vulnerability was found in libxml2. This issue occurs when parsing XPath elements under certain circumstances when the XML schematron has the <sch:name path="..."/> schema elements. This flaw allows a malicious actor to craft a malicious XML document used as input for libxml, resulting in the program's crash using libxml or other possible undefined behaviors.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:10 | libxml2 | 0 | 2.12.5-7.el10_0 |
| AlmaLinux:10 | libxml2-devel | 0 | 2.12.5-7.el10_0 |
| AlmaLinux:10 | libxml2-static | 0 | 2.12.5-7.el10_0 |
| AlmaLinux:10 | python3-libxml2 | 0 | 2.12.5-7.el10_0 |
| AlmaLinux:8 | libxml2 | 0 | 2.9.7-21.el8_10.1 |
| AlmaLinux:8 | libxml2-devel | 0 | 2.9.7-21.el8_10.1 |
| AlmaLinux:8 | python3-libxml2 | 0 | 2.9.7-21.el8_10.1 |
| AlmaLinux:9 | libxml2 | 0 | 2.9.13-10.el9_6 |
| AlmaLinux:9 | libxml2-devel | 0 | 2.9.13-10.el9_6 |
| AlmaLinux:9 | python3-libxml2 | 0 | 2.9.13-10.el9_6 |
| Debian:11 | libxml2 | 0 | No fix |
| Debian:12 | libxml2 | 0 | No fix |
| Debian:13 | libxml2 | 0 | No fix |
| Debian:14 | libxml2 | 0 | 2.12.7+dfsg+really2.9.14-2 |
| Mageia:9 | libxml2 | 0 | 2.10.4-1.8.mga9 |
| Mageia:9 | libxslt | 0 | 1.1.38-1.2.mga9 |
| SUSE:Enterprise Storage 7.1 | libxml2 | 0 | 2.9.7-150000.3.82.1 |
| SUSE:Enterprise Storage 7.1 | python-libxml2-python | 0 | 2.9.7-150000.3.82.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | libxml2 | 0 | 2.9.7-150000.3.82.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | python-libxml2-python | 0 | 2.9.7-150000.3.82.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | libxml2 | 0 | 2.10.3-150500.5.29.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | libxml2-python | 0 | 2.10.3-150500.5.29.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS | libxml2 | 0 | 2.10.3-150500.5.29.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS | libxml2-python | 0 | 2.10.3-150500.5.29.1 |
| SUSE:Linux Enterprise Micro 5.1 | libxml2 | 0 | 2.9.7-150000.3.82.1 |
| SUSE:Linux Enterprise Micro 5.2 | libxml2 | 0 | 2.9.7-150000.3.82.1 |
| SUSE:Linux Enterprise Micro 5.2 | python-libxml2-python | 0 | 2.9.7-150000.3.82.1 |
| SUSE:Linux Enterprise Micro 5.5 | libxml2 | 0 | 2.10.3-150500.5.29.1 |
| SUSE:Linux Enterprise Micro 5.5 | libxml2-python | 0 | 2.10.3-150500.5.29.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | libxml2 | 0 | 2.10.3-150500.5.29.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | libxml2-python | 0 | 2.10.3-150500.5.29.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP7 | libxml2 | 0 | 2.12.10-150700.4.3.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP7 | libxml2-python | 0 | 2.12.10-150700.4.3.1 |
| SUSE:Linux Enterprise Module for Python 3 15 SP6 | libxml2-python | 0 | 2.10.3-150500.5.29.1 |
| SUSE:Linux Enterprise Module for Python 3 15 SP7 | libxml2-python | 0 | 2.12.10-150700.4.3.1 |
| SUSE:Linux Enterprise Server 12 SP5-LTSS | libxml2 | 0 | 2.9.4-46.87.1 |
| SUSE:Linux Enterprise Server 12 SP5-LTSS | python-libxml2 | 0 | 2.9.4-46.87.1 |
| SUSE:Linux Enterprise Server 15 SP3-LTSS | libxml2 | 0 | 2.9.7-150000.3.82.1 |
| SUSE:Linux Enterprise Server 15 SP3-LTSS | python-libxml2-python | 0 | 2.9.7-150000.3.82.1 |
| SUSE:Linux Enterprise Server 15 SP5-LTSS | libxml2 | 0 | 2.10.3-150500.5.29.1 |
| SUSE:Linux Enterprise Server 15 SP5-LTSS | libxml2-python | 0 | 2.10.3-150500.5.29.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | libxml2 | 0 | 2.9.4-46.87.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | python-libxml2 | 0 | 2.9.4-46.87.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | libxml2 | 0 | 2.9.7-150000.3.82.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | python-libxml2-python | 0 | 2.9.7-150000.3.82.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP5 | libxml2 | 0 | 2.10.3-150500.5.29.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP5 | libxml2-python | 0 | 2.10.3-150500.5.29.1 |
| openSUSE:Leap 15.6 | libxml2 | 0 | 2.10.3-150500.5.29.1 |
| openSUSE:Leap 15.6 | libxml2-python | 0 | 2.10.3-150500.5.29.1 |
| openSUSE:Leap 15.6 | python-libxml2-python | 0 | 2.9.7-150000.3.82.1 |
| openSUSE:Tumbleweed | libxml2 | 0 | 2.13.8-2.1 |
Related vulnerabilities
- CVE-2025-49796 A vulnerability was found in libxml2. Also affects libxml2
- CVE-2025-49795 A NULL pointer dereference vulnerability was found in libxml2 when processing XPath XML… 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-7425 A flaw was found in libxslt where the attribute type, atype, flags are modified in a way… 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-2024-56171 libxml2 before 2.12.10 and 2.13.x before 2.13.6 has a use-after-free in… Also affects libxml2