Every CVE Search/ Get API key

CVE-2025-31115

XZ has a heap-use-after-free bug in threaded .xz decoder

8.7 HighFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

0.68%Up 0.6 points since Apr 4, 2025
90%50%10%1%

What each source reports

CVE List Score used 8.7

XZ 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.

Record
CVE-2025-31115
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Weakness
CWE-366, CWE-416, CWE-476, CWE-826
Updated
2026-11-02
EUVDEUVD-2025-14786 8.7

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.

Record
EUVD-2025-14786
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Updated
2026-11-02
NVD 8.7

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.

Record
CVE-2025-31115
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Weakness
CWE-366, CWE-416, CWE-476, CWE-826
Updated
2026-11-02
OSVALPINE-CVE-2025-31115 8.7

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.

Record
ALPINE-CVE-2025-31115
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Updated
2026-11-02
OSV 8.7

XZ 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.

Record
CVE-2025-31115
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Weakness
CWE-366, CWE-416, CWE-476, CWE-826
Updated
2026-11-02
OSVDEBIAN-CVE-2025-31115 8.7

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.

Record
DEBIAN-CVE-2025-31115
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Updated
2026-11-02
Show 14 moreShow less
OSVOESA-2025-1430 8.2

xz security update

XZ Utils is free general-purpose data compression software with a high compression ratio. XZ Utils were written for POSIX-like systems, but also work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils.

Security Fix(es):

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.(CVE-2025-31115)

Record
OESA-2025-1430
CVSS 3.1
8.2 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
Updated
2026-11-02
OSVOESA-2025-1431 8.2

xz security update

XZ Utils is free general-purpose data compression software with a high compression ratio. XZ Utils were written for POSIX-like systems, but also work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils.

Security Fix(es):

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.(CVE-2025-31115)

Record
OESA-2025-1431
CVSS 3.1
8.2 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
Updated
2026-11-02
OSVRHSA-2025:7524 7.5

Red Hat Security Advisory: xz security update

Record
RHSA-2025:7524
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVRLSA-2025:7524 7.5

Important: xz security update

XZ Utils is an integrated collection of user-space file compression utilities based on the Lempel-Ziv-Markov chain algorithm (LZMA), which performs lossless data compression. The algorithm provides a high compression ratio while keeping the decompression time short.

Security Fix(es):

  • xz: XZ has a heap-use-after-free bug in threaded .xz decoder (CVE-2025-31115)

For more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.

Record
RLSA-2025:7524
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2025-31115 8.7

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.

Record
UBUNTU-CVE-2025-31115
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Updated
2026-11-02
OSVALSA-2025:7524 No score

Important: xz security update

XZ Utils is an integrated collection of user-space file compression utilities based on the Lempel-Ziv-Markov chain algorithm (LZMA), which performs lossless data compression. The algorithm provides a high compression ratio while keeping the decompression time short.

Security Fix(es):

  • xz: XZ has a heap-use-after-free bug in threaded .xz decoder (CVE-2025-31115)

For more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.

Record
ALSA-2025:7524
Updated
2026-11-02
OSVAZL-59497 No score

CVE-2025-31115 affecting package xz for versions less than 5.4.4-2

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.

Record
AZL-59497
Updated
2026-11-02
OSVHSEC-2025-0003 No score

Use after free in multithreaded lzma (.xz) decoder

Use after free in multithreaded lzma (.xz) decoder

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 (CVE-2025-31115). 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 Haskell xz-clib library vendors and builds the C implementation. The xz package does not use the multithreaded decoder and is therefore unaffected.

Record
HSEC-2025-0003
Updated
2026-11-02
OSVMGASA-2025-0131 No score

Updated xz packages fix security vulnerability

XZ has a heap-use-after-free bug in threaded .xz decoder. (CVE-2025-31115)

Record
MGASA-2025-0131
Updated
2026-11-02
OSVopenSUSE-SU-2025:14984-1 No score

liblzma5-32bit-5.8.1-1.1 on GA media

These are all security issues fixed in the liblzma5-32bit-5.8.1-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2025:14984-1
Updated
2026-11-02
OSVSUSE-SU-2025:1137-1 No score

Security update for xz

This update for xz fixes the following issues:

  • CVE-2025-31115: Fixed heap use after free and writing to an address based on the null pointer plus an offset (bsc#1240414)
Record
SUSE-SU-2025:1137-1
Updated
2026-11-02
OSVSUSE-SU-2025:20553-1 No score

Security update for xz

This update for xz fixes the following issues:

  • CVE-2025-31115: Fixed heap use after free and writing to an address based on the null pointer plus an offset (bsc#1240414)
Record
SUSE-SU-2025:20553-1
Updated
2026-11-02
OSVSUSE-SU-2025:20590-1 No score

Security update for xz

This update for xz fixes the following issues:

  • CVE-2025-31115: Fixed heap use after free and writing to an address based on the null pointer plus an offset (bsc#1240414)
Record
SUSE-SU-2025:20590-1
Updated
2026-11-02
OSVUSN-7414-1 No score

xz-utils vulnerability

Harri K. Koskinen discovered that XZ Utils incorrectly handled the threaded xz decoder. If a user or automated system were tricked into processing an xz file, a remote attacker could use this issue to cause XZ Utils to crash, resulting in a denial of service, or possibly execute arbitrary code.

Record
USN-7414-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
xz
Alpine:v3.18
before 5.4.3-r1
5.4.3-r1
xz
Alpine:v3.19
before 5.4.5-r1
5.4.5-r1
xz
Alpine:v3.20
before 5.6.2-r1
5.6.2-r1
xz
Alpine:v3.21
before 5.6.3-r1
5.6.3-r1
xz
Alpine:v3.22
before 5.8.1-r0
5.8.1-r0
xz
Alpine:v3.23
before 5.8.1-r0
5.8.1-r0
xz
Alpine:v3.24
before 5.8.1-r0
5.8.1-r0
xz
AlmaLinux:10
before 1:5.6.2-4.el10_0
1:5.6.2-4.el10_0
xz-devel
AlmaLinux:10
before 1:5.6.2-4.el10_0
1:5.6.2-4.el10_0
xz-libs
AlmaLinux:10
before 1:5.6.2-4.el10_0
1:5.6.2-4.el10_0
Show 26 moreShow less
Affected packages
PackageAffectedFixed
xz-lzma-compat
AlmaLinux:10
before 1:5.6.2-4.el10_0
1:5.6.2-4.el10_0
xz
Azure Linux:3
before 5.4.4-2
5.4.4-2
xz
Alpaquita:stream
5.4.1-r0 up to 5.8.1-r0
5.8.1-r0
xz
BellSoft Hardened Containers:stream
5.4.1-r0 up to 5.8.1-r0
5.8.1-r0
xz-utils
Debian:12
before 5.4.1-1, plus listed versions
5.4.1-0.2
5.4.1-1
xz-utils
Debian:13
before 5.8.1-1
5.8.1-1
xz-utils
Debian:14
before 5.8.1-1
5.8.1-1
xz-clib
Hackage
5.6.3 up to 5.8.1, plus listed versions
5.6.45.8.05.8.0.1
5.8.1
xz
Mageia:9
before 5.4.3-1.1.mga9
5.4.3-1.1.mga9
xz
openEuler:24.03-LTS
before 5.4.7-5.oe2403
5.4.7-5.oe2403
xz
openEuler:24.03-LTS-SP1
before 5.4.7-5.oe2403sp1
5.4.7-5.oe2403sp1
xz-debuginfo
Red Hat:enterprise_linux:10.0
before 1:5.6.2-4.el10_0
1:5.6.2-4.el10_0
xz-debugsource
Red Hat:enterprise_linux:10.0
before 1:5.6.2-4.el10_0
1:5.6.2-4.el10_0
xz-devel
Red Hat:enterprise_linux:10.0
before 1:5.6.2-4.el10_0
1:5.6.2-4.el10_0
xz-libs-debuginfo
Red Hat:enterprise_linux:10.0
before 1:5.6.2-4.el10_0
1:5.6.2-4.el10_0
xz-lzma-compat
Red Hat:enterprise_linux:10.0
before 1:5.6.2-4.el10_0
1:5.6.2-4.el10_0
xz-lzma-compat-debuginfo
Red Hat:enterprise_linux:10.0
before 1:5.6.2-4.el10_0
1:5.6.2-4.el10_0
xz
Red Hat:enterprise_linux:10.0
before 1:5.6.2-4.el10_0
1:5.6.2-4.el10_0
xz-libs
Red Hat:enterprise_linux:10.0
before 1:5.6.2-4.el10_0
1:5.6.2-4.el10_0
xz
Rocky Linux:10
before 1:5.6.2-4.el10_0
1:5.6.2-4.el10_0
xz
SUSE:Linux Enterprise Module for Basesystem 15 SP6
before 5.4.1-150600.3.3.1
5.4.1-150600.3.3.1
xz
openSUSE:Leap 15.6
before 5.4.1-150600.3.3.1
5.4.1-150600.3.3.1
xz
SUSE:Linux Micro 6.0
before 5.4.3-5.1
5.4.3-5.1
xz
SUSE:Linux Micro 6.1
before 5.4.3-slfo.1.1_2.1
5.4.3-slfo.1.1_2.1
xz-utils
Ubuntu:24.04:LTS
before 5.6.1+really5.4.5-1ubuntu0.2, plus listed versions
5.4.1-0.25.4.4-0.15.4.5-0.15.4.5-0.35.6.0-0.25.6.1+really5.4.5-15.6.1+really5.4.5-1build0.1
5.6.1+really5.4.5-1ubuntu0.2
xz
openSUSE:Tumbleweed
before 5.8.1-1.1
5.8.1-1.1

History

History
RecordedChangedSources
first indexedCVE List, EUVD, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2025-31115 is a high vulnerability (CVSS 8.7) in Tukaani-project Xz, published April 3, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.68%, the 52nd percentile. Fixed in xz 5.4.3-r1.

References

Show 29 moreShow less
MoveEnter Open