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.

Severity (CVSS 4.0)8.7High
Exploit odds (30 days)0.7%top 47.6% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
AlmaLinux:10xz1:5.6.2-4.el10_0ALSA-2025:7524
AlmaLinux:10xz-devel1:5.6.2-4.el10_0ALSA-2025:7524
AlmaLinux:10xz-libs1:5.6.2-4.el10_0ALSA-2025:7524
AlmaLinux:10xz-lzma-compat1:5.6.2-4.el10_0ALSA-2025:7524
Alpine:v3.20xz5.6.2-r1ALPINE-CVE-2025-31115
Alpine:v3.21xz5.6.3-r1ALPINE-CVE-2025-31115
Alpine:v3.22xz5.8.1-r0ALPINE-CVE-2025-31115
Alpine:v3.23xz5.8.1-r0ALPINE-CVE-2025-31115
Alpine:v3.24xz5.8.1-r0ALPINE-CVE-2025-31115
Debian:12xz-utils5.4.1-1DSA-5895-1
Debian:12xz-utils5.4.1-1DEBIAN-CVE-2025-31115
Debian:13xz-utils5.8.1-1DEBIAN-CVE-2025-31115
Debian:14xz-utils5.8.1-1DEBIAN-CVE-2025-31115
Rocky Linux:10xz1:5.6.2-4.el10_0RLSA-2025:7524
Ubuntu:24.04:LTSxz-utils5.6.1+really5.4.5-1ubuntu0.2USN-7414-1
Ubuntu:24.04:LTSxz-utils5.6.1+really5.4.5-1ubuntu0.2UBUNTU-CVE-2025-31115

Affected products (as reported)

VendorProductVersions
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