Vulnerability · Published Sep 10, 2025 · Assigned by canonical
CVE-2025-9714Stack overflow in libxml2
Medium 6.2
In plain English
A medium-severity security flaw in libxml2 from libxml2. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 5% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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 & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | libxml2 | 2.9.7-21.el8_10.4 | ALSA-2026:11349 |
| AlmaLinux:8 | libxml2 | 2.9.7-21.el8_10.8 | ALSA-2026:69655 |
| AlmaLinux:9 | libxml2 | 2.9.13-14.el9_7 | ALSA-2025:22376 |
| AlmaLinux:8 | libxml2-devel | 2.9.7-21.el8_10.4 | ALSA-2026:11349 |
| AlmaLinux:8 | libxml2-devel | 2.9.7-21.el8_10.8 | ALSA-2026:69655 |
| AlmaLinux:9 | libxml2-devel | 2.9.13-14.el9_7 | ALSA-2025:22376 |
| AlmaLinux:8 | python3-libxml2 | 2.9.7-21.el8_10.4 | ALSA-2026:11349 |
| AlmaLinux:8 | python3-libxml2 | 2.9.7-21.el8_10.8 | ALSA-2026:69655 |
| AlmaLinux:9 | python3-libxml2 | 2.9.13-14.el9_7 | ALSA-2025:22376 |
| Debian:12 | libxml2 | 2.9.14+dfsg-1.3~deb12u5 | DEBIAN-CVE-2025-9714 |
| Debian:13 | libxml2 | 2.12.7+dfsg+really2.9.14-2.1+deb13u2 | DEBIAN-CVE-2025-9714 |
| Debian:14 | libxml2 | 2.14.5+dfsg-0.1 | DEBIAN-CVE-2025-9714 |
| Rocky Linux:8 | libxml2 | 0:2.9.7-21.el8_10.4 | RLSA-2026:11349 |
| Rocky Linux:9 | libxml2 | 0:2.9.13-14.el9_7 | RLSA-2025:22376 |
| Ubuntu:22.04:LTS | libxml2 | 2.9.13+dfsg-1ubuntu0.9 | USN-7743-1 |
| Ubuntu:22.04:LTS | libxml2 | 2.9.13+dfsg-1ubuntu0.9 | UBUNTU-CVE-2025-9714 |
| Ubuntu:24.04:LTS | libxml2 | 2.9.14+dfsg-1.3ubuntu3.5 | USN-7743-1 |
| Ubuntu:24.04:LTS | libxml2 | 2.9.14+dfsg-1.3ubuntu3.5 | UBUNTU-CVE-2025-9714 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| libxml2 | libxml2 | 0 – before 2.10.00 – before 2.12.7+dfsg+really2.9.14-0.4ubuntu0.30 – before 2.9.14+dfsg-1.3ubuntu3.50 – before 2.9.13+dfsg-1ubuntu0.90 – before 2.9.10+dfsg-5ubuntu0.20.04.10+esm20 – before 2.9.4+dfsg1-6.1ubuntu1.9+esm50 – before 2.9.3+dfsg1-1ubuntu0.7+esm100 – before 2.9.1+dfsg1-3ubuntu4.13+esm9 |
Weakness: CWE-674 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H