CVE-2025-6170 Libxml2: stack buffer overflow in xmllint interactive shell command handling

Low 2.5 Published Updated

A stack buffer overflow in the xmllint interactive shell allows attackers to cause a crash or potentially execute code via overly long commands.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2025-6170?

CVE-2025-6170 is a low-severity memory corruption vulnerability in Redhat Enterprise Linux, published on 16 Jun 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

A flaw was found in the interactive shell of the xmllint command-line tool, used for parsing XML files. When a user inputs an overly long command, the program does not check the input size properly, which can cause it to crash. This issue might allow attackers to run harmful code in rare configurations without modern protections.

Weakness: CWE-121

Which versions are affected by CVE-2025-6170?

It affects 4 products.

Linux distribution packages (40)
libxml2 AlmaLinux:10All versions2.12.5-10.el10_2.2
libxml2-devel AlmaLinux:10All versions2.12.5-10.el10_2.2
libxml2-static AlmaLinux:10All versions2.12.5-10.el10_2.2
python3-libxml2 AlmaLinux:10All versions2.12.5-10.el10_2.2
libxml2 AlmaLinux:8All versions2.9.7-21.el8_10.6
libxml2-devel AlmaLinux:8All versions2.9.7-21.el8_10.6
python3-libxml2 AlmaLinux:8All versions2.9.7-21.el8_10.6
libxml2 AlmaLinux:9All versions2.9.13-14.el9_8.2
libxml2-devel AlmaLinux:9All versions2.9.13-14.el9_8.2
python3-libxml2 AlmaLinux:9All versions2.9.13-14.el9_8.2
libxml2 Red Hat:enterprise_linux:10.2All versions0:2.12.5-10.el10_2.2
libxml2-debuginfo Red Hat:enterprise_linux:10.2All versions0:2.12.5-10.el10_2.2
libxml2-debugsource Red Hat:enterprise_linux:10.2All versions0:2.12.5-10.el10_2.2
libxml2-devel Red Hat:enterprise_linux:10.2All versions0:2.12.5-10.el10_2.2
libxml2-static Red Hat:enterprise_linux:10.2All versions0:2.12.5-10.el10_2.2
python3-libxml2 Red Hat:enterprise_linux:10.2All versions0:2.12.5-10.el10_2.2
python3-libxml2-debuginfo Red Hat:enterprise_linux:10.2All versions0:2.12.5-10.el10_2.2
libxml2-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:2.9.7-21.el8_10.6
libxml2-debugsource Red Hat:enterprise_linux:8::appstreamAll versions0:2.9.7-21.el8_10.6
libxml2-devel Red Hat:enterprise_linux:8::appstreamAll versions0:2.9.7-21.el8_10.6
python3-libxml2-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:2.9.7-21.el8_10.6
libxml2 Red Hat:enterprise_linux:8::baseosAll versions0:2.9.7-21.el8_10.6
libxml2-debuginfo Red Hat:enterprise_linux:8::baseosAll versions0:2.9.7-21.el8_10.6
libxml2-debugsource Red Hat:enterprise_linux:8::baseosAll versions0:2.9.7-21.el8_10.6
python3-libxml2 Red Hat:enterprise_linux:8::baseosAll versions0:2.9.7-21.el8_10.6
python3-libxml2-debuginfo Red Hat:enterprise_linux:8::baseosAll versions0:2.9.7-21.el8_10.6
libxml2-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions0:2.9.13-14.el9_8.2
libxml2-debugsource Red Hat:enterprise_linux:9::appstreamAll versions0:2.9.13-14.el9_8.2
libxml2-devel Red Hat:enterprise_linux:9::appstreamAll versions0:2.9.13-14.el9_8.2
python3-libxml2-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions0:2.9.13-14.el9_8.2
libxml2 Red Hat:enterprise_linux:9::baseosAll versions0:2.9.13-14.el9_8.2
libxml2-debuginfo Red Hat:enterprise_linux:9::baseosAll versions0:2.9.13-14.el9_8.2
libxml2-debugsource Red Hat:enterprise_linux:9::baseosAll versions0:2.9.13-14.el9_8.2
python3-libxml2 Red Hat:enterprise_linux:9::baseosAll versions0:2.9.13-14.el9_8.2
python3-libxml2-debuginfo Red Hat:enterprise_linux:9::baseosAll versions0:2.9.13-14.el9_8.2
libxml2 Red Hat:enterprise_linux_eus:10.0All versions0:2.12.5-9.el10_0.2
libxml2-debuginfo Red Hat:enterprise_linux_eus:10.0All versions0:2.12.5-9.el10_0.2
libxml2-debugsource Red Hat:enterprise_linux_eus:10.0All versions0:2.12.5-9.el10_0.2
libxml2-devel Red Hat:enterprise_linux_eus:10.0All versions0:2.12.5-9.el10_0.2
libxml2-static Red Hat:enterprise_linux_eus:10.0All versions0:2.12.5-9.el10_0.2

Products include Redhat Enterprise Linux, Redhat Jboss Core Services, Redhat Openshift Container Platform, Xmlsoft Libxml2.

How do I fix CVE-2025-6170?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2025-6170 being exploited?

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

All Redhat Enterprise Linux vulnerabilities

Sources

Also known as ALPINE-CVE-2025-6170, ALSA-2026:36734, ALSA-2026:39304, ALSA-2026:39317, AZL-64470, AZL-64482 and 22 more.

Is CVE-2025-6170 in your software?

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

Check your SBOMs for free