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

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

- **Severity:** Low 2.5 (`CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:L`)
- **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:** Yes
- **Published:** 16 Jun 2025
- **Updated:** 14 Oct 2026
- **Also known as:** ALPINE-CVE-2025-6170, ALSA-2026:36734, ALSA-2026:39304, ALSA-2026:39317, AZL-64470, AZL-64482, BELL-CVE-2025-6170, CLSA-2026-1778006676, DEBIAN-CVE-2025-6170, ECHO-ff66-d4b7-9e4f, GHSA-6qrf-r65h-2r77, OESA-2025-1867, OESA-2025-1868, OESA-2025-1901, OESA-2025-1986, RHSA-2026:36734, RHSA-2026:39304, RHSA-2026:39317, RHSA-2026:70596, RHSA-2026:70639, RHSA-2026:79118, RHSA-2026:79119, RHSA-2026:79120, RHSA-2026:79121, RLSA-2026:36734, RLSA-2026:39304, RLSA-2026:39317, UBUNTU-CVE-2025-6170

## 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 (Stack-based Buffer Overflow)

## Which versions are affected by CVE-2025-6170?

It affects 4 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `libxml2` | AlmaLinux:10 | All versions | 2.12.5-10.el10_2.2 |
| `libxml2-devel` | AlmaLinux:10 | All versions | 2.12.5-10.el10_2.2 |
| `libxml2-static` | AlmaLinux:10 | All versions | 2.12.5-10.el10_2.2 |
| `python3-libxml2` | AlmaLinux:10 | All versions | 2.12.5-10.el10_2.2 |
| `libxml2` | AlmaLinux:8 | All versions | 2.9.7-21.el8_10.6 |
| `libxml2-devel` | AlmaLinux:8 | All versions | 2.9.7-21.el8_10.6 |
| `python3-libxml2` | AlmaLinux:8 | All versions | 2.9.7-21.el8_10.6 |
| `libxml2` | AlmaLinux:9 | All versions | 2.9.13-14.el9_8.2 |
| `libxml2-devel` | AlmaLinux:9 | All versions | 2.9.13-14.el9_8.2 |
| `python3-libxml2` | AlmaLinux:9 | All versions | 2.9.13-14.el9_8.2 |
| `libxml2` | Red Hat:enterprise_linux:10.2 | All versions | 0:2.12.5-10.el10_2.2 |
| `libxml2-debuginfo` | Red Hat:enterprise_linux:10.2 | All versions | 0:2.12.5-10.el10_2.2 |
| `libxml2-debugsource` | Red Hat:enterprise_linux:10.2 | All versions | 0:2.12.5-10.el10_2.2 |
| `libxml2-devel` | Red Hat:enterprise_linux:10.2 | All versions | 0:2.12.5-10.el10_2.2 |
| `libxml2-static` | Red Hat:enterprise_linux:10.2 | All versions | 0:2.12.5-10.el10_2.2 |
| `python3-libxml2` | Red Hat:enterprise_linux:10.2 | All versions | 0:2.12.5-10.el10_2.2 |
| `python3-libxml2-debuginfo` | Red Hat:enterprise_linux:10.2 | All versions | 0:2.12.5-10.el10_2.2 |
| `libxml2-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:2.9.7-21.el8_10.6 |
| `libxml2-debugsource` | Red Hat:enterprise_linux:8::appstream | All versions | 0:2.9.7-21.el8_10.6 |
| `libxml2-devel` | Red Hat:enterprise_linux:8::appstream | All versions | 0:2.9.7-21.el8_10.6 |
| `python3-libxml2-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:2.9.7-21.el8_10.6 |
| `libxml2` | Red Hat:enterprise_linux:8::baseos | All versions | 0:2.9.7-21.el8_10.6 |
| `libxml2-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:2.9.7-21.el8_10.6 |
| `libxml2-debugsource` | Red Hat:enterprise_linux:8::baseos | All versions | 0:2.9.7-21.el8_10.6 |
| `python3-libxml2` | Red Hat:enterprise_linux:8::baseos | All versions | 0:2.9.7-21.el8_10.6 |
| `python3-libxml2-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:2.9.7-21.el8_10.6 |
| `libxml2-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:2.9.13-14.el9_8.2 |
| `libxml2-debugsource` | Red Hat:enterprise_linux:9::appstream | All versions | 0:2.9.13-14.el9_8.2 |
| `libxml2-devel` | Red Hat:enterprise_linux:9::appstream | All versions | 0:2.9.13-14.el9_8.2 |
| `python3-libxml2-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:2.9.13-14.el9_8.2 |
| `libxml2` | Red Hat:enterprise_linux:9::baseos | All versions | 0:2.9.13-14.el9_8.2 |
| `libxml2-debuginfo` | Red Hat:enterprise_linux:9::baseos | All versions | 0:2.9.13-14.el9_8.2 |
| `libxml2-debugsource` | Red Hat:enterprise_linux:9::baseos | All versions | 0:2.9.13-14.el9_8.2 |
| `python3-libxml2` | Red Hat:enterprise_linux:9::baseos | All versions | 0:2.9.13-14.el9_8.2 |
| `python3-libxml2-debuginfo` | Red Hat:enterprise_linux:9::baseos | All versions | 0:2.9.13-14.el9_8.2 |
| `libxml2` | Red Hat:enterprise_linux_eus:10.0 | All versions | 0:2.12.5-9.el10_0.2 |
| `libxml2-debuginfo` | Red Hat:enterprise_linux_eus:10.0 | All versions | 0:2.12.5-9.el10_0.2 |
| `libxml2-debugsource` | Red Hat:enterprise_linux_eus:10.0 | All versions | 0:2.12.5-9.el10_0.2 |
| `libxml2-devel` | Red Hat:enterprise_linux_eus:10.0 | All versions | 0:2.12.5-9.el10_0.2 |
| `libxml2-static` | Red Hat:enterprise_linux_eus:10.0 | All versions | 0:2.12.5-9.el10_0.2 |

Products: 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.

## Is CVE-2025-6170 being exploited?

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

## Other vulnerabilities in Redhat Enterprise Linux

- [CVE-2018-14667](https://insights.sbomify.com/CVE-2018-14667/): Red Hat JBoss RichFaces Framework Expression Language Injection (critical 9.8, exploited in the wild)
- [CVE-2021-20325](https://insights.sbomify.com/CVE-2021-20325/): Missing fixes for CVE-2021-40438 and CVE-2021-26691 in the versions of httpd, as shipped in Red Hat Enterprise Linux 8.5.0, causes a securit (critical 9.8)
- [CVE-2018-25011](https://insights.sbomify.com/CVE-2018-25011/): Memory corruption in libwebp (critical 9.8)
- [CVE-2018-25014](https://insights.sbomify.com/CVE-2018-25014/): Other in libwebp (critical 9.8)
- [CVE-2014-3585](https://insights.sbomify.com/CVE-2014-3585/): Supply chain in redhat-upgrade-tool (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-6170 and fix it if it is affected.

What it is: 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.
Exploitation: There is no known exploitation of CVE-2025-6170 in the wild and no public exploit code.

Affected product: Redhat Enterprise Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-6170/ (Markdown: https://insights.sbomify.com/CVE-2025-6170/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-6170
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-6170
- OSV: https://osv.dev/vulnerability/CVE-2025-6170

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-6170/
Summaries are generated and may contain mistakes; the official description above is the record.
