CVE-2025-31115XZ has a heap-use-after-free bug in threaded .xz decoder
XZ Utils provide a general-purpose data-compression library plus command-line tools. In XZ Utils 5.3.3alpha to 5.8.0, the multithreaded .xz decoder in liblzma has a bug where invalid input can at least result in a crash. The effects include heap use after free and writing to an address based on the null pointer plus an offset. Applications and libraries that use the lzma_stream_decoder_mt function are affected. The bug has been fixed in XZ Utils 5.8.1, and the fix has been committed to the v5.4, v5.6, v5.8, and master branches in the xz Git repository. No new release packages will be made from the old stable branches, but a standalone patch is available that applies to all affected releases.
What to do
Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 24.04 | xz-utils | Fixed | 5.6.1+really5.4.5-1ubuntu0.2 | UBUNTU-CVE-2025-31115 |
| Ubuntu 22.04 | xz-utils | Not affected vulnerable_code_not_present | ||
| Debian 14 | xz-utils | Fixed | 5.8.1-1 | DEBIAN-CVE-2025-31115 |
| Debian 13 | xz-utils | Fixed | 5.8.1-1 | DEBIAN-CVE-2025-31115 |
| Debian 12 | xz-utils | Fixed | 5.4.1-1 | DEBIAN-CVE-2025-31115 |
| Red Hat Enterprise Linux 10 | xz | Fixed | 1:5.6.2-4.el10_0 | RHSA-2025:7524 |
| Red Hat Enterprise Linux 10 | xz-devel | Fixed | 1:5.6.2-4.el10_0 | RHSA-2025:7524 |
| Red Hat Enterprise Linux 10 | xz-libs | Fixed | 1:5.6.2-4.el10_0 | RHSA-2025:7524 |
| Red Hat Enterprise Linux 10 | xz-lzma-compat | Fixed | 1:5.6.2-4.el10_0 | RHSA-2025:7524 |
| Red Hat Enterprise Linux 9 | xz | Not affected | ||
| Red Hat Enterprise Linux 9 | xz-devel | Not affected | ||
| Red Hat Enterprise Linux 9 | xz-libs | Not affected | ||
| Red Hat Enterprise Linux 9 | xz-lzma-compat | Not affected | ||
| Red Hat Enterprise Linux 8 | xz | Not affected | ||
| Red Hat Enterprise Linux 8 | xz-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | xz-libs | Not affected | ||
| Red Hat Enterprise Linux 8 | xz-lzma-compat | Not affected | ||
| Red Hat Enterprise Linux 7 | xz | Not affected | ||
| Red Hat Enterprise Linux 7 | xz-compat-libs | Not affected | ||
| Red Hat Enterprise Linux 7 | xz-devel | Not affected | ||
| Red Hat Enterprise Linux 7 | xz-libs | Not affected | ||
| Red Hat Enterprise Linux 7 | xz-lzma-compat | Not affected | ||
| Red Hat Enterprise Linux 6 | xz | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | xz-devel | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | xz-libs | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | xz-lzma-compat | Will not fix Out of support scope | ||
| AlmaLinux 10 | xz | Fixed | 1:5.6.2-4.el10_0 | ALSA-2025:7524 |
| AlmaLinux 10 | xz-devel | Fixed | 1:5.6.2-4.el10_0 | ALSA-2025:7524 |
| AlmaLinux 10 | xz-libs | Fixed | 1:5.6.2-4.el10_0 | ALSA-2025:7524 |
| AlmaLinux 10 | xz-lzma-compat | Fixed | 1:5.6.2-4.el10_0 | ALSA-2025:7524 |
| Rocky Linux 10 | xz | Fixed | 1:5.6.2-4.el10_0 | RLSA-2025:7524 |
| Alpine Linux 3.24 | xz | Fixed | 5.8.1-r0 | ALPINE-CVE-2025-31115 |
| Alpine Linux 3.23 | xz | Fixed | 5.8.1-r0 | ALPINE-CVE-2025-31115 |
| Alpine Linux 3.22 | xz | Fixed | 5.8.1-r0 | ALPINE-CVE-2025-31115 |
| Alpine Linux 3.21 | xz | Fixed | 5.6.3-r1 | ALPINE-CVE-2025-31115 |
| Alpine Linux 3.20 | xz | Fixed | 5.6.2-r1 | ALPINE-CVE-2025-31115 |
| Alpine Linux 3.19 | xz | Fixed | 5.4.5-r1 | ALPINE-CVE-2025-31115 |
| Alpine Linux 3.18 | xz | Fixed | 5.4.3-r1 | ALPINE-CVE-2025-31115 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- tukaani-project xz: affected: >= 5.3.3alpha, < 5.8.1
References
- https://github.com/tukaani-project/xz/security/advisories/GHSA-6cc8-p5mm-29w2
- https://github.com/tukaani-project/xz/commit/d5a2ffe41bb77b918a8c96084885d4dbe4bf6480
- https://tukaani.org/xz/xz-cve-2025-31115.patch
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.