Vulnerability · Published Apr 3, 2025 · Assigned by GitHub_M
CVE-2025-31115XZ has a heap-use-after-free bug in threaded .xz decoder
High 8.7
In plain English
A high-severity use-after-free in xz from tukaani-project. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.7% (higher than 52% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:10 | xz | 1:5.6.2-4.el10_0 | ALSA-2025:7524 |
| AlmaLinux:10 | xz-devel | 1:5.6.2-4.el10_0 | ALSA-2025:7524 |
| AlmaLinux:10 | xz-libs | 1:5.6.2-4.el10_0 | ALSA-2025:7524 |
| AlmaLinux:10 | xz-lzma-compat | 1:5.6.2-4.el10_0 | ALSA-2025:7524 |
| Alpine:v3.20 | xz | 5.6.2-r1 | ALPINE-CVE-2025-31115 |
| Alpine:v3.21 | xz | 5.6.3-r1 | ALPINE-CVE-2025-31115 |
| Alpine:v3.22 | xz | 5.8.1-r0 | ALPINE-CVE-2025-31115 |
| Alpine:v3.23 | xz | 5.8.1-r0 | ALPINE-CVE-2025-31115 |
| Alpine:v3.24 | xz | 5.8.1-r0 | ALPINE-CVE-2025-31115 |
| Debian:12 | xz-utils | 5.4.1-1 | DSA-5895-1 |
| Debian:12 | xz-utils | 5.4.1-1 | DEBIAN-CVE-2025-31115 |
| Debian:13 | xz-utils | 5.8.1-1 | DEBIAN-CVE-2025-31115 |
| Debian:14 | xz-utils | 5.8.1-1 | DEBIAN-CVE-2025-31115 |
| Rocky Linux:10 | xz | 1:5.6.2-4.el10_0 | RLSA-2025:7524 |
| Ubuntu:24.04:LTS | xz-utils | 5.6.1+really5.4.5-1ubuntu0.2 | USN-7414-1 |
| Ubuntu:24.04:LTS | xz-utils | 5.6.1+really5.4.5-1ubuntu0.2 | UBUNTU-CVE-2025-31115 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| tukaani-project | xz | >= 5.3.3alpha, < 5.8.1 |
Weakness: CWE-366, CWE-416, CWE-476, CWE-826 · Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
References
- https://github.com/tukaani-project/xz/security/advisories/GHSA-6cc8-p5mm-29w2 x_refsource_CONFIRM
- https://github.com/tukaani-project/xz/commit/d5a2ffe41bb77b918a8c96084885d4dbe4bf6480 x_refsource_MISC
- https://tukaani.org/xz/xz-cve-2025-31115.patch x_refsource_MISC
- http://www.openwall.com/lists/oss-security/2025/04/03/1
- http://www.openwall.com/lists/oss-security/2025/04/03/2
- http://www.openwall.com/lists/oss-security/2025/04/03/3
- https://cert-portal.siemens.com/productcert/html/ssa-082556.html