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

- Severity: High 8.7 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.68%, higher than 53% of CVEs (2026-12-01)
- Published: 2025-04-03T16:57:05.488Z
- Modified: 2026-10-15T01:06:00.051Z
- Also known as: HSEC-2025-0003, GHSA-6cc8-p5mm-29w2
- Weaknesses: CWE-366, CWE-416, CWE-476, CWE-826
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- tukaani-project xz: >= 5.3.3alpha, < 5.8.1
- xz-clib (Hackage): from 5.6.3 before 5.8.1

## References

- <https://github.com/tukaani-project/xz/security/advisories/GHSA-6cc8-p5mm-29w2>
- <https://github.com/tukaani-project/xz/commit/d5a2ffe41bb77b918a8c96084885d4dbe4bf6480> (fix)
- <https://tukaani.org/xz/xz-cve-2025-31115.patch>
- <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>
- <https://tukaani.org/xz/threaded-decoder-early-free.html> (article)
- <https://github.com/hasufell/lzma-static/commit/e95fe96530568addfc83b771900025053e2c6951> (fix)

## Sources

- CVE List: [CVE-2025-31115](https://www.cve.org/CVERecord?id=CVE-2025-31115), CVE Terms of Use, modified 2026-10-15
- Haskell Security Advisories: [HSEC-2025-0003](https://osv.dev/vulnerability/HSEC-2025-0003), CC0-1.0, modified 2025-11-14
- NVD: [CVE-2025-31115](https://nvd.nist.gov/vuln/detail/CVE-2025-31115), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-31115 · Whole record: https://cve.day/CVE-2025-31115.json · Rebuilt by cve.day 2026-11-25T22:58:56.013Z
