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.

Severity (CVSS 3.1)6.2Medium
Exploit odds (30 days)0.2%top 94.9% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
AlmaLinux:8libxml22.9.7-21.el8_10.4ALSA-2026:11349
AlmaLinux:8libxml22.9.7-21.el8_10.8ALSA-2026:69655
AlmaLinux:9libxml22.9.13-14.el9_7ALSA-2025:22376
AlmaLinux:8libxml2-devel2.9.7-21.el8_10.4ALSA-2026:11349
AlmaLinux:8libxml2-devel2.9.7-21.el8_10.8ALSA-2026:69655
AlmaLinux:9libxml2-devel2.9.13-14.el9_7ALSA-2025:22376
AlmaLinux:8python3-libxml22.9.7-21.el8_10.4ALSA-2026:11349
AlmaLinux:8python3-libxml22.9.7-21.el8_10.8ALSA-2026:69655
AlmaLinux:9python3-libxml22.9.13-14.el9_7ALSA-2025:22376
Debian:12libxml22.9.14+dfsg-1.3~deb12u5DEBIAN-CVE-2025-9714
Debian:13libxml22.12.7+dfsg+really2.9.14-2.1+deb13u2DEBIAN-CVE-2025-9714
Debian:14libxml22.14.5+dfsg-0.1DEBIAN-CVE-2025-9714
Rocky Linux:8libxml20:2.9.7-21.el8_10.4RLSA-2026:11349
Rocky Linux:9libxml20:2.9.13-14.el9_7RLSA-2025:22376
Ubuntu:22.04:LTSlibxml22.9.13+dfsg-1ubuntu0.9USN-7743-1
Ubuntu:22.04:LTSlibxml22.9.13+dfsg-1ubuntu0.9UBUNTU-CVE-2025-9714
Ubuntu:24.04:LTSlibxml22.9.14+dfsg-1.3ubuntu3.5USN-7743-1
Ubuntu:24.04:LTSlibxml22.9.14+dfsg-1.3ubuntu3.5UBUNTU-CVE-2025-9714

Affected products (as reported)

VendorProductVersions
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

References