CVE-2025-58058

github.com/ulikunitz/xz leaks memory when decoding a corrupted multiple LZMA archives

Published Aug 28, 2025 CVSS 3.1 · 5.3 Medium EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2025-26149 github.com/ulikunitz/xz leaks memory when decoding a corrupted multiple LZMA archives
Github GHSA Github GHSA GHSA-jc7w-c686-c4v9 github.com/ulikunitz/xz leaks memory when decoding a corrupted multiple LZMA archives
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title github.com/ulikunitz/xz leaks memory when decoding a corrupted multiple LZMA archives
Weaknesses CWE-770
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'}

Subscriptions

No data.

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 29, 2025, 1:23 PM
Reserved
Aug 22, 2025, 2:30 PM
Status
Deferred
Published
Aug 28, 2025, 10:15 PM
Modified
Sep 26, 2026, 12:10 AM
Severity
Moderate
Public date
Aug 28, 2025, 9:54 PM