CVE-2025-9714
Medium · 6.2CVSS
6.2
EPSS
0.2%
Published
Sep 10, 2025
CISA due date
—
Cloudanix analysis
A flaw in a widely used library for handling XML data can let someone crash programs that process certain inputs, potentially disrupting services until the library is updated.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Uncontrolled recursion in XPath evaluation functions (xmlXPathRunEval, xmlXPathCtxtCompile, xmlXPathEvalExpr) in libxml2 <= 2.9.14 due to resetting recursion depth before recursive calls, enabling stack overflow via crafted expressions.
Why it matters to the business
Applications relying on libxml2 for XML/XPath processing can be crashed by local input, causing denial of service, interrupted services, and potential data processing failures across dependent systems.
How an attack unfolds
A local attacker supplies a crafted XPath expression to an application using vulnerable libxml2; the reset recursion depth in evaluation functions allows unbounded recursion leading to stack exhaustion and process crash.
How to fix it
Upgrade libxml2 to a build containing commit 677a42645ef22b5a50741bad5facf9d8a8bc6d21 or later; rebuild and redeploy all dependent applications.
How to confirm the fix worked
Verify installed libxml2 version and commit; attempt reproduction with known recursion-triggering expressions in a test environment to confirm absence of crash.
Typical attack path
- Locate an application or service that invokes libxml2 XPath processing on attacker-controlled input
- Craft a malicious XPath expression designed to trigger deep recursion
- Submit the expression through local interfaces, files, or APIs
- Trigger evaluation to exhaust stack memory and crash the process
How to detect it
Review application crash logs and core dumps for stack overflows involving XPath functions; correlate with recent XML/XPath processing activity.
- xmlXPathRunEval
- xmlXPathCtxtCompile
- xmlXPathEvalExpr
- stack overflow in libxml2 XPath evaluation
What your security team should do
- Prioritize upgrade of libxml2 across all systems and containers
- Inventory applications and libraries depending on libxml2
- Implement input validation or sandboxing around XPath processing where upgrades are delayed
- Monitor application stability metrics for XPath-related crashes
The record
Uncontrolled recursion in XPath evaluation in libxml2 up to and including version 2.9.14 allows a local attacker to cause a stack overflow via crafted expressions. XPath processing functions `xmlXPathRunEval`, `xmlXPathCtxtCompile`, and `xmlXPathEvalExpr` were resetting recursion depth to zero before making potentially recursive calls. When such functions were called recursively this could allow for uncontrolled recursion and lead to a stack overflow. These functions now preserve recursion depth across recursive calls, allowing recursion depth to be controlled.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:9 | libxml2 | 0 | 2.9.13-14.el9_7 |
| AlmaLinux:9 | libxml2-devel | 0 | 2.9.13-14.el9_7 |
| AlmaLinux:9 | python3-libxml2 | 0 | 2.9.13-14.el9_7 |
| Debian:11 | libxml2 | 0 | No fix |
| Debian:12 | libxml2 | 0 | No fix |
| Debian:13 | libxml2 | 0 | No fix |
| Debian:14 | libxml2 | 0 | 2.14.5+dfsg-0.1 |
| SUSE:Linux Enterprise Micro 5.2 | libxml2 | 0 | 2.9.7-150000.3.88.1 |
| SUSE:Linux Enterprise Micro 5.2 | python-libxml2-python | 0 | 2.9.7-150000.3.88.1 |
| SUSE:Linux Enterprise Micro 5.3 | libxml2 | 0 | 2.9.14-150400.5.50.1 |
| SUSE:Linux Enterprise Micro 5.3 | libxml2-python | 0 | 2.9.14-150400.5.50.1 |
| SUSE:Linux Enterprise Micro 5.4 | libxml2 | 0 | 2.9.14-150400.5.50.1 |
| SUSE:Linux Enterprise Micro 5.4 | libxml2-python | 0 | 2.9.14-150400.5.50.1 |
| openSUSE:Leap 15.6 | python-libxml2-python | 0 | 2.9.7-150000.3.88.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-2024-56171 libxml2 before 2.12.10 and 2.13.x before 2.13.6 has a use-after-free in… Also affects libxml2