# CVE-2025-58058: github.com/ulikunitz/xz leaks memory when decoding a corrupted multiple LZMA archives

- Severity: Medium 5.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- 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.51%, higher than 45% of CVEs (2026-12-01)
- Published: 2025-08-28T19:36:22.000Z
- Modified: 2026-09-26T00:10:00.127Z
- Also known as: GHSA-jc7w-c686-c4v9, GO-2025-3922
- Related: CGA-ph6j-9ffx-7pf8
- Weaknesses: CWE-770
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

xz is a pure golang package for reading and writing xz-compressed files. Prior to version 0.5.14, it is possible to put data in front of an LZMA-encoded byte stream without detecting the situation while reading the header. This can lead to increased memory consumption because the current implementation allocates the full decoding buffer directly after reading the header. The LZMA header doesn't include a magic number or has a checksum to detect such an issue according to the specification. Note that the code recognizes the issue later while reading the stream, but at this time the memory allocation has already been done. This issue has been patched in version 0.5.14.

(As written by CVE List.)

## Affected

- ulikunitz xz: < 0.5.14
- github.com/ulikunitz/xz (Go): before 0.5.15

## Every score

- GitHub_M: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- GitHub: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`

## References

- <https://github.com/ulikunitz/xz/security/advisories/GHSA-jc7w-c686-c4v9> (advisory, web)
- <https://github.com/ulikunitz/xz/commit/88ddf1d0d98d688db65de034f48960b2760d2ae2> (fix, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-58058> (advisory)
- <https://github.com/ulikunitz/xz> (package)

## Sources

- CVE List: [CVE-2025-58058](https://www.cve.org/CVERecord?id=CVE-2025-58058), CVE Terms of Use, modified 2025-08-29
- GitHub Advisory Database: [GHSA-jc7w-c686-c4v9](https://github.com/advisories/GHSA-jc7w-c686-c4v9), CC-BY-4.0, modified 2026-09-10
- Go Vulnerability Database: [GO-2025-3922](https://pkg.go.dev/vuln/GO-2025-3922), CC-BY-4.0, modified 2026-02-04
- NVD: [CVE-2025-58058](https://nvd.nist.gov/vuln/detail/CVE-2025-58058), Public domain, modified 2026-09-26

---

Page: https://cve.day/CVE-2025-58058 · Whole record: https://cve.day/CVE-2025-58058.json · Rebuilt by cve.day 2026-11-25T22:59:03.838Z
