CVE-2025-9714 Stack overflow in libxml2
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:8 | All versions | 2.9.7-21.el8_10.4 |
libxml2-devel AlmaLinux:8 | All versions | 2.9.7-21.el8_10.4 |
python3-libxml2 AlmaLinux:8 | All versions | 2.9.7-21.el8_10.4 |
libxml2 AlmaLinux:9 | All versions | 2.9.13-14.el9_7 |
libxml2-devel AlmaLinux:9 | All versions | 2.9.13-14.el9_7 |
python3-libxml2 AlmaLinux:9 | All versions | 2.9.13-14.el9_7 |
libxml2-debuginfo Red Hat:enterprise_linux:8::appstream | All versions | 0:2.9.7-21.el8_10.4 |
libxml2-debugsource Red Hat:enterprise_linux:8::appstream | All versions | 0:2.9.7-21.el8_10.4 |
libxml2-devel Red Hat:enterprise_linux:8::appstream | All versions | 0:2.9.7-21.el8_10.4 |
python3-libxml2-debuginfo Red Hat:enterprise_linux:8::appstream | All versions | 0:2.9.7-21.el8_10.4 |
libxml2 Red Hat:enterprise_linux:8::baseos | All versions | 0:2.9.7-21.el8_10.4 |
libxml2-debuginfo Red Hat:enterprise_linux:8::baseos | All versions | 0:2.9.7-21.el8_10.4 |
libxml2-debugsource Red Hat:enterprise_linux:8::baseos | All versions | 0:2.9.7-21.el8_10.4 |
python3-libxml2 Red Hat:enterprise_linux:8::baseos | All versions | 0:2.9.7-21.el8_10.4 |
python3-libxml2-debuginfo Red Hat:enterprise_linux:8::baseos | All versions | 0:2.9.7-21.el8_10.4 |
libxml2-debuginfo Red Hat:enterprise_linux:9::appstream | All versions | 0:2.9.13-14.el9_7 |
libxml2-debugsource Red Hat:enterprise_linux:9::appstream | All versions | 0:2.9.13-14.el9_7 |
libxml2-devel Red Hat:enterprise_linux:9::appstream | All versions | 0:2.9.13-14.el9_7 |
python3-libxml2-debuginfo Red Hat:enterprise_linux:9::appstream | All versions | 0:2.9.13-14.el9_7 |
libxml2 Red Hat:enterprise_linux:9::baseos | All versions | 0:2.9.13-14.el9_7 |
libxml2-debuginfo Red Hat:enterprise_linux:9::baseos | All versions | 0:2.9.13-14.el9_7 |
libxml2-debugsource Red Hat:enterprise_linux:9::baseos | All versions | 0:2.9.13-14.el9_7 |
python3-libxml2 Red Hat:enterprise_linux:9::baseos | All versions | 0:2.9.13-14.el9_7 |
python3-libxml2-debuginfo Red Hat:enterprise_linux:9::baseos | All versions | 0:2.9.13-14.el9_7 |
libxml2-debuginfo Red Hat:rhel_aus:8.4::appstream | All versions | 0:2.9.7-9.el8_4.9 |
libxml2-debugsource Red Hat:rhel_aus:8.4::appstream | All versions | 0:2.9.7-9.el8_4.9 |
libxml2-devel Red Hat:rhel_aus:8.4::appstream | All versions | 0:2.9.7-9.el8_4.9 |
python3-libxml2-debuginfo Red Hat:rhel_aus:8.4::appstream | All versions | 0:2.9.7-9.el8_4.9 |
libxml2 Red Hat:rhel_aus:8.4::baseos | All versions | 0:2.9.7-9.el8_4.9 |
libxml2-debuginfo Red Hat:rhel_aus:8.4::baseos | All versions | 0:2.9.7-9.el8_4.9 |
libxml2-debugsource Red Hat:rhel_aus:8.4::baseos | All versions | 0:2.9.7-9.el8_4.9 |
python3-libxml2 Red Hat:rhel_aus:8.4::baseos | All versions | 0:2.9.7-9.el8_4.9 |
python3-libxml2-debuginfo Red Hat:rhel_aus:8.4::baseos | All versions | 0:2.9.7-9.el8_4.9 |
libxml2-debuginfo Red Hat:rhel_aus:8.6::appstream | All versions | 0:2.9.7-13.el8_6.13 |
libxml2-debugsource Red Hat:rhel_aus:8.6::appstream | All versions | 0:2.9.7-13.el8_6.13 |
libxml2-devel Red Hat:rhel_aus:8.6::appstream | All versions | 0:2.9.7-13.el8_6.13 |
python3-libxml2-debuginfo Red Hat:rhel_aus:8.6::appstream | All versions | 0:2.9.7-13.el8_6.13 |
libxml2 Red Hat:rhel_aus:8.6::baseos | All versions | 0:2.9.7-13.el8_6.13 |
libxml2-debuginfo Red Hat:rhel_aus:8.6::baseos | All versions | 0:2.9.7-13.el8_6.13 |
libxml2-debugsource Red Hat:rhel_aus:8.6::baseos | All versions | 0: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.
Other vulnerabilities in Xmlsoft Libxml2
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.