Skip to content
OpenAdvisories
Medium · 6.2 CVE-2025-9714 EUVD-2025-27609GHSA-fmj5-rvmp-845r

Stack overflow in libxml2

Published Sep 10, 2025 · Updated May 12, 2026 · Assigned by canonical

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 products

VendorProductAffectedFixed
libxml2 libxml2 < 2.10.0, < 2.12.7+dfsg+really2.9.14-0.4ubuntu0.3, < 2.9.14+dfsg-1.3ubuntu3.5, < 2.9.13+dfsg-1ubuntu0.9, < 2.9.10+dfsg-5ubuntu0.20.04.10+esm2, < 2.9.4+dfsg1-6.1ubuntu1.9+esm5, < 2.9.3+dfsg1-1ubuntu0.7+esm10, < 2.9.1+dfsg1-3ubuntu4.13+esm9 2.10.0

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 libxml2 2.14.5+dfsg-0.1 —
Debian 13 libxml2 2.12.7+dfsg+really2.9.14-2.1+deb13u2 —
Debian 12 libxml2 2.9.14+dfsg-1.3~deb12u5 —
Debian 11 libxml2 2.9.10+dfsg-6.7+deb11u9 DLA-4319-1
ReleasePackageFixed inAdvisory
Ubuntu 24.04 LTS libxml2 2.9.14+dfsg-1.3ubuntu3.5 USN-7743-1
Ubuntu 22.04 LTS libxml2 2.9.13+dfsg-1ubuntu0.9 USN-7743-1
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 20.04 LTS libxml2 2.9.10+dfsg-5ubuntu0.20.04.10+esm2 USN-7743-1
Ubuntu Pro 18.04 LTS libxml2 2.9.4+dfsg1-6.1ubuntu1.9+esm5 USN-7743-1
Ubuntu Pro 16.04 LTS libxml2 2.9.3+dfsg1-1ubuntu0.7+esm10 USN-7743-1
Ubuntu Pro 14.04 LTS libxml2 2.9.1+dfsg1-3ubuntu4.13+esm9 USN-7743-1
ReleasePackageFixed inAdvisory
RHEL 9 libxml2 +2 2.9.13-14.el9_7 RHSA-2025:22376
RHEL 8 libxml2 +2 2.9.7-21.el8_10.4 RHSA-2026:11349
Show 13 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
RHEL 9.6 EUS libxml2 +2 2.9.13-12.el9_6.1 RHSA-2025:22377
RHEL 9.4 EUS libxml2 +2 2.9.13-13.el9_4 RHSA-2025:22163
RHEL 9.2 E4S libxml2 +2 2.9.13-3.el9_2.10 RHSA-2025:22162
RHEL 9.0 E4S libxml2 +2 2.9.13-1.el9_0.8 RHSA-2025:22177
RHEL 8.8 TUS libxml2 +2 2.9.7-16.el8_8.13 RHSA-2026:14858
RHEL 8.8 E4S libxml2 +2 2.9.7-16.el8_8.13 RHSA-2026:14858
RHEL 8.6 TUS libxml2 +2 2.9.7-13.el8_6.13 RHSA-2026:15967
RHEL 8.6 E4S libxml2 +2 2.9.7-13.el8_6.13 RHSA-2026:15967
RHEL 8.6 AUS libxml2 +2 2.9.7-13.el8_6.13 RHSA-2026:15967
RHEL 8.4 EUS Long Life libxml2 +2 2.9.7-9.el8_4.9 RHSA-2026:14832
RHEL 8.4 AUS libxml2 +2 2.9.7-9.el8_4.9 RHSA-2026:14832
RHEL 7 ELS libxml2 +3 2.9.1-6.el7_9.14 RHSA-2026:22420
Red Hat Hardened Images 1 libxml2 +4 2.15.2-0.3.hum1 RHSA-2026:7519

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 9 libxml2 +2 2.9.13-14.el9_7 ALSA-2025:22376
AlmaLinux 8 libxml2 +2 2.9.7-21.el8_10.4 ALSA-2026:69655, ALSA-2026:11349

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 9 libxml2 2.9.13-14.el9_7 RLSA-2025:22376
Rocky Linux 8 libxml2 2.9.7-21.el8_10.4 RLSA-2026:11349
ReleasePackageFixed inAdvisory
SLES 12 SP5 libxml2 +1 2.9.4-46.93.1 SUSE-SU-2025:4104-1
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLE Micro 5.4 libxml2 +1 2.9.14-150400.5.50.1 SUSE-SU-2025:4116-1
SLE Micro 5.3 libxml2 +1 2.9.14-150400.5.50.1 SUSE-SU-2025:4116-1
SLE Micro 5.2 libxml2 +1 2.9.7-150000.3.88.1 SUSE-SU-2025:4115-1
ReleasePackageFixed inAdvisory
openSUSE Leap 15.6 python-libxml2-python 2.9.7-150000.3.88.1 SUSE-SU-2025:4115-1

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 9 libxml2 +2 2.9.13-14.el9_7 ELSA-2025-22376
Oracle Linux 8 libxml2 +2 2.9.7-21.el8_10.4 ELSA-2026-11349
Oracle Linux 7 libxml2 +3 2.9.1-6.0.13.el7_9.6 ELSA-2026-22420

Advisories 30

References