CVE-2025-58058 Details
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.
A vulnerability in the Ulikunitz XZ package, prior to version 0.5.14, allows for the introduction of data before an LZMA-encoded byte stream without proper detection while reading the header. This oversight can lead to excessive memory usage, as the implementation allocates the full decoding buffer immediately after the header is read. The LZMA header lacks a magic number or checksum to identify such issues, following the official specification. Although the problem is recognized later in the stream, the memory allocation has already occurred, potentially causing significant memory leaks, especially when processing multiple LZMA archives with corrupted headers. This vulnerability affects software that utilizes 'lzma.NewReader' or 'lzma.ReaderConfig.NewReader'.
Users can update to Ulikunitz XZ version 0.5.14 or later, which includes mitigations such as limiting the dictionary size to prevent excessive memory allocations. Instructions for updating can be found in the Ulikunitz XZ repository on GitHub.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Aug 28, 2025CISA-ADP
Assessed Aug 29, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/ulikunitz/xz/commit/88ddf1d0d98d688db65de034f48960b2760d2ae2 | [email protected] | Source CodeVendor |
| https://github.com/ulikunitz/xz/security/advisories/GHSA-jc7w-c686-c4v9 | [email protected] | AdvisoryExploitRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-770 | Allocation of Resources Without Limits or Throttling | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| github.com/ulikunitz/xz/lzma | All versions |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Sep 26, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Aug 28, 2025 | New CVE Received | [email protected] |
Volerion