8.7high
XZ has a heap-use-after-free bug in threaded .xz decoder
- Severity
- 8.7high CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.68% (higher than 53% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- HSEC-2025-0003GHSA-6cc8-p5mm-29w2
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
| Product or package | Versions | Reported by |
|---|---|---|
| tukaani-project xz | >= 5.3.3alpha, < 5.8.1 | CVE List |
| xz-clib (Hackage) | from 5.6.3 before 5.8.1 | Haskell Security Advisories |
Classification
What each source says
CVE List
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.
Haskell Security Advisories
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.
NVD (es)
XZ Utils proporciona una librería de compresión de datos de propósito general, además de herramientas de línea de comandos. En XZ Utils 5.3.3alpha a 5.8.0, el decodificador .xz multiproceso de liblzma presenta un error que provoca un fallo en la ejecución de una entrada no válida. Esto afecta a use after free y a la escritura en una dirección basada en el puntero nulo y un desplazamiento. Las aplicaciones y librerías que utilizan la función lzma_stream_decoder_mt se ven afectadas. El error se ha corregido en XZ Utils 5.8.1 y la corrección se ha implementado en las ramas v5.4, v5.6, v5.8 y master del repositorio Git de xz. No se crearán nuevos paquetes de versiones a partir de las ramas estables antiguas, pero existe un parche independiente disponible para todas las versiones afectadas.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-31115 changed 2026-10-15 | CVE Terms of Use |
| Haskell Security Advisories | HSEC-2025-0003 changed 2025-11-14 | CC0-1.0 |
| NVD | CVE-2025-31115 changed 2026-06-17 | Public domain |