CVE-2025-9714 Stack overflow in libxml2

Medium 6.2 Published Updated

A local attacker can cause a stack overflow and denial of service in libxml2 by providing crafted XPath expressions that trigger uncontrolled recursion.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-9714?

CVE-2025-9714 is a medium-severity denial of service vulnerability in Xmlsoft Libxml2, published on 10 Sep 2025. It can only be exploited from the same machine or local network, with no action from the victim.

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.

Weakness: CWE-674

Which versions are affected by CVE-2025-9714?

It affects 1 product.

Linux distribution packages (40)
libxml2 AlmaLinux:8All versions2.9.7-21.el8_10.4
libxml2-devel AlmaLinux:8All versions2.9.7-21.el8_10.4
python3-libxml2 AlmaLinux:8All versions2.9.7-21.el8_10.4
libxml2 AlmaLinux:9All versions2.9.13-14.el9_7
libxml2-devel AlmaLinux:9All versions2.9.13-14.el9_7
python3-libxml2 AlmaLinux:9All versions2.9.13-14.el9_7
libxml2-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:2.9.7-21.el8_10.4
libxml2-debugsource Red Hat:enterprise_linux:8::appstreamAll versions0:2.9.7-21.el8_10.4
libxml2-devel Red Hat:enterprise_linux:8::appstreamAll versions0:2.9.7-21.el8_10.4
python3-libxml2-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:2.9.7-21.el8_10.4
libxml2 Red Hat:enterprise_linux:8::baseosAll versions0:2.9.7-21.el8_10.4
libxml2-debuginfo Red Hat:enterprise_linux:8::baseosAll versions0:2.9.7-21.el8_10.4
libxml2-debugsource Red Hat:enterprise_linux:8::baseosAll versions0:2.9.7-21.el8_10.4
python3-libxml2 Red Hat:enterprise_linux:8::baseosAll versions0:2.9.7-21.el8_10.4
python3-libxml2-debuginfo Red Hat:enterprise_linux:8::baseosAll versions0:2.9.7-21.el8_10.4
libxml2-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions0:2.9.13-14.el9_7
libxml2-debugsource Red Hat:enterprise_linux:9::appstreamAll versions0:2.9.13-14.el9_7
libxml2-devel Red Hat:enterprise_linux:9::appstreamAll versions0:2.9.13-14.el9_7
python3-libxml2-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions0:2.9.13-14.el9_7
libxml2 Red Hat:enterprise_linux:9::baseosAll versions0:2.9.13-14.el9_7
libxml2-debuginfo Red Hat:enterprise_linux:9::baseosAll versions0:2.9.13-14.el9_7
libxml2-debugsource Red Hat:enterprise_linux:9::baseosAll versions0:2.9.13-14.el9_7
python3-libxml2 Red Hat:enterprise_linux:9::baseosAll versions0:2.9.13-14.el9_7
python3-libxml2-debuginfo Red Hat:enterprise_linux:9::baseosAll versions0:2.9.13-14.el9_7
libxml2-debuginfo Red Hat:rhel_aus:8.4::appstreamAll versions0:2.9.7-9.el8_4.9
libxml2-debugsource Red Hat:rhel_aus:8.4::appstreamAll versions0:2.9.7-9.el8_4.9
libxml2-devel Red Hat:rhel_aus:8.4::appstreamAll versions0:2.9.7-9.el8_4.9
python3-libxml2-debuginfo Red Hat:rhel_aus:8.4::appstreamAll versions0:2.9.7-9.el8_4.9
libxml2 Red Hat:rhel_aus:8.4::baseosAll versions0:2.9.7-9.el8_4.9
libxml2-debuginfo Red Hat:rhel_aus:8.4::baseosAll versions0:2.9.7-9.el8_4.9
libxml2-debugsource Red Hat:rhel_aus:8.4::baseosAll versions0:2.9.7-9.el8_4.9
python3-libxml2 Red Hat:rhel_aus:8.4::baseosAll versions0:2.9.7-9.el8_4.9
python3-libxml2-debuginfo Red Hat:rhel_aus:8.4::baseosAll versions0:2.9.7-9.el8_4.9
libxml2-debuginfo Red Hat:rhel_aus:8.6::appstreamAll versions0:2.9.7-13.el8_6.13
libxml2-debugsource Red Hat:rhel_aus:8.6::appstreamAll versions0:2.9.7-13.el8_6.13
libxml2-devel Red Hat:rhel_aus:8.6::appstreamAll versions0:2.9.7-13.el8_6.13
python3-libxml2-debuginfo Red Hat:rhel_aus:8.6::appstreamAll versions0:2.9.7-13.el8_6.13
libxml2 Red Hat:rhel_aus:8.6::baseosAll versions0:2.9.7-13.el8_6.13
libxml2-debuginfo Red Hat:rhel_aus:8.6::baseosAll versions0:2.9.7-13.el8_6.13
libxml2-debugsource Red Hat:rhel_aus:8.6::baseosAll versions0:2.9.7-13.el8_6.13

Products include Xmlsoft Libxml2.

How do I fix CVE-2025-9714?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2025-9714 being exploited?

There is no known exploitation of CVE-2025-9714 in the wild and no public exploit code.

All Xmlsoft Libxml2 vulnerabilities

Sources

Also known as ALSA-2025:22376, ALSA-2026:11349, CLSA-2025-1759411642, CLSA-2025-1760020147, CLSA-2025-1760020311, CLSA-2025-1760020498 and 27 more.

Is CVE-2025-9714 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free