github.com/ulikunitz/xz leaks memory when decoding a corrupted multiple LZMA archives
Collected exploitation and prediction evidence
Risk source coverageCISA KEV is observed exploitation evidence. FIRST EPSS is a dated prediction of exploitation in the next 30 days. Missing scores are unknown. This collector requests predictions only for explicit CVE aliases in the public NuGet archive; Microsoft release views retain their existing prediction scope.
No collected risk observation for these identifiers. This does not establish absence of exploitation or a zero probability.
cve-program · CVE-2025-58058
Publishedxz 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.
- Source published
- 28 Aug 2025 21:54:05 UTC
- Source modified
- 29 Aug 2025 13:23:07 UTC
- Observed here
- 23 Oct 2026 15:48:27 UTC
- Source terms
- CVE Program Terms of Use
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: cve-program · CVE Program Terms of Use. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS 3.1 · 5.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
euvd · EUVD-2025-26149
Publishedxz 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.
EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.
Original publisher date fields
datePublished: Aug 28, 2025, 9:54:05 PM
dateUpdated: Aug 29, 2025, 1:23:07 PM
32 related source bulletins · separate from aliases
SUSE-SU-2025:03448-1: Security update for warewulf4
CVE-2025-58058
msrc_CVE-2025-58058: github.com/ulikunitz/xz leaks memory when decoding a corrupted multiple LZMA archives
CVE-2025-58058
SUSE-SU-2026:0383-1: Security update for rekor
CVE-2025-29923 · CVE-2025-58058
openSUSE-SU-2025:15509-1: sbctl-0.17-2.1 on GA media
CVE-2025-58058
RHSA-2026:26254: Red Hat Security Advisory: Assisted Installer RHEL 9 components for Multicluster Engine for Kubernetes 2.8.8
CVE-2025-58058 · CVE-2026-39883
openSUSE-SU-2026:21824-1: Security update for containerized-data-importer1.65
CVE-2025-22869 · CVE-2025-22870 · CVE-2025-22872 · CVE-2025-47911 · CVE-2025-47913 · CVE-2025-47914 · CVE-2025-58058 · CVE-2025-58181 · CVE-2025-58190 · CVE-2026-25680 · CVE-2026-25681 · CVE-2026-27136 · CVE-2026-33186 · CVE-2026-33814 · CVE-2026-34986 · CVE-2026-35469 · CVE-2026-39821 · CVE-2026-39827 · CVE-2026-39828 · CVE-2026-39829 · CVE-2026-39830 · CVE-2026-39831 · CVE-2026-39832 · CVE-2026-39833 · CVE-2026-39834 · CVE-2026-39835 · CVE-2026-41178 · CVE-2026-42502 · CVE-2026-42506 · CVE-2026-42508 · CVE-2026-46595 · CVE-2026-46597 · CVE-2026-46598 · CVE-2026-56852 · CVE-2026-56854 · CVE-2026-56855 · CVE-2026-78662 · CVE-2026-84303 · CVE-2026-84304
SUSE-SU-2025:4121-1: Security update for alloy
CVE-2025-11065 · CVE-2025-58058
openSUSE-SU-2026:21151-1: Security update for warewulf4
CVE-2025-58058 · CVE-2025-69725 · CVE-2026-33814 · CVE-2026-34986 · CVE-2026-39821
RHSA-2026:26257: Red Hat Security Advisory: Assisted Installer RHEL 8 components for Multicluster Engine for Kubernetes 2.8.8
CVE-2025-58058 · CVE-2026-39883
openSUSE-SU-2026:20798-1: Security update for trivy
CVE-2024-3817 · CVE-2024-45337 · CVE-2024-45338 · CVE-2024-51744 · CVE-2025-11065 · CVE-2025-21613 · CVE-2025-21614 · CVE-2025-22868 · CVE-2025-22869 · CVE-2025-22872 · CVE-2025-27144 · CVE-2025-30204 · CVE-2025-46569 · CVE-2025-47291 · CVE-2025-47911 · CVE-2025-47913 · CVE-2025-47914 · CVE-2025-53547 · CVE-2025-58058 · CVE-2025-58181 · CVE-2025-58190
openSUSE-SU-2026:11305-1: containerized-data-importer1.65-api-1.65.0-2.1 on GA media
CVE-2025-22870 · CVE-2025-22872 · CVE-2025-58058 · CVE-2025-58190 · CVE-2026-27136 · CVE-2026-33186 · CVE-2026-34986 · CVE-2026-35469 · CVE-2026-39821 · CVE-2026-39827 · CVE-2026-39828 · CVE-2026-39832 · CVE-2026-42508
openSUSE-SU-2026:20105-1: Security update for sbctl
CVE-2025-47911 · CVE-2025-58058 · CVE-2025-58190
openSUSE-SU-2025-20073-1: Security update for alloy
CVE-2025-11065 · CVE-2025-58058
openSUSE-SU-2025:15722-1: hauler-1.3.1-1.1 on GA media
CVE-2025-11579 · CVE-2025-47911 · CVE-2025-58058
openSUSE-SU-2025:20117-1: Security update for trivy
CVE-2024-3817 · CVE-2024-45337 · CVE-2024-45338 · CVE-2024-51744 · CVE-2025-11065 · CVE-2025-21613 · CVE-2025-21614 · CVE-2025-22868 · CVE-2025-22869 · CVE-2025-22872 · CVE-2025-27144 · CVE-2025-30204 · CVE-2025-46569 · CVE-2025-47291 · CVE-2025-53547 · CVE-2025-58058
openSUSE-SU-2025-20031-1: Security update for warewulf4
CVE-2025-58058
openSUSE-SU-2025-20117-1: Security update for trivy
CVE-2024-3817 · CVE-2024-45337 · CVE-2024-45338 · CVE-2024-51744 · CVE-2025-11065 · CVE-2025-21613 · CVE-2025-21614 · CVE-2025-22868 · CVE-2025-22869 · CVE-2025-22872 · CVE-2025-27144 · CVE-2025-30204 · CVE-2025-46569 · CVE-2025-47291 · CVE-2025-53547 · CVE-2025-58058
openSUSE-SU-2025:20160-1: Security update for hauler
CVE-2024-0406 · CVE-2024-45338 · CVE-2025-11579 · CVE-2025-22872 · CVE-2025-46569 · CVE-2025-47911 · CVE-2025-58058 · CVE-2025-58190
openSUSE-SU-2025:20031-1: Security update for warewulf4
CVE-2025-58058
openSUSE-SU-2026:11126-1: velociraptor-0.7.0.4.git185.a5708584-2.1 on GA media
CVE-2023-45288 · CVE-2024-45339 · CVE-2025-13465 · CVE-2025-22868 · CVE-2025-22869 · CVE-2025-22870 · CVE-2025-22872 · CVE-2025-24358 · CVE-2025-47911 · CVE-2025-58058 · CVE-2025-58181 · CVE-2025-58190 · CVE-2025-5889 · CVE-2025-64718 · CVE-2025-6545 · CVE-2025-6547 · CVE-2025-7783 · CVE-2026-1229 · CVE-2026-25128 · CVE-2026-25680 · CVE-2026-25681 · CVE-2026-26278 · CVE-2026-26996 · CVE-2026-27136 · CVE-2026-2739 · CVE-2026-27606 · CVE-2026-27904 · CVE-2026-33036 · CVE-2026-33186 · CVE-2026-33487 · CVE-2026-33814 · CVE-2026-34986 · CVE-2026-39821 · CVE-2026-39827 · CVE-2026-39828 · CVE-2026-39829 · CVE-2026-39830 · CVE-2026-39831 · CVE-2026-39832 · CVE-2026-39833 · CVE-2026-39834 · CVE-2026-39835 · CVE-2026-42039 · CVE-2026-42502 · CVE-2026-42506 · CVE-2026-42508 · CVE-2026-46595 · CVE-2026-46597 · CVE-2026-46598
openSUSE-SU-2025:15631-1: alloy-1.11.2-2.1 on GA media
CVE-2025-11065 · CVE-2025-58058
openSUSE-SU-2025:15564-1: govulncheck-vulndb-0.0.20250917T170349-1.1 on GA media
CVE-2025-4953 · CVE-2025-54123 · CVE-2025-54376 · CVE-2025-58058 · CVE-2025-58063 · CVE-2025-58157 · CVE-2025-58158 · CVE-2025-58430 · CVE-2025-58437 · CVE-2025-58445 · CVE-2025-58450 · CVE-2025-59358 · CVE-2025-59359 · CVE-2025-59360 · CVE-2025-59361 · CVE-2025-7445 · CVE-2025-8396 · CVE-2025-9072 · CVE-2025-9076 · CVE-2025-9078 · CVE-2025-9084
openSUSE-SU-2026:20192-1: Security update for tailscale
CVE-2025-22869 · CVE-2025-58058
SUSE-SU-2025:21137-1: Security update for alloy
CVE-2025-11065 · CVE-2025-58058
openSUSE-SU-2025:15515-1: regclient-0.9.2-1.1 on GA media
CVE-2025-58058
openSUSE-SU-2025:15537-1: warewulf4-4.6.4-1.1 on GA media
CVE-2025-58058
openSUSE-SU-2025:15542-1: trivy-0.66.0-1.1 on GA media
CVE-2025-58058
openSUSE-SU-2025:15508-1: rekor-1.4.1-1.1 on GA media
CVE-2025-29923 · CVE-2025-58058
RHSA-2026:37387: Red Hat Security Advisory: Red Hat OpenShift Data Foundation 4.22.0 security, enhancement & bug fix update
CVE-2024-25621 · CVE-2024-40635 · CVE-2024-45310 · CVE-2025-8766 · CVE-2025-21613 · CVE-2025-21614 · CVE-2025-22870 · CVE-2025-47911 · CVE-2025-52881 · CVE-2025-54410 · CVE-2025-58058 · CVE-2025-64329 · CVE-2025-66506 · CVE-2026-22772 · CVE-2026-23831 · CVE-2026-24117 · CVE-2026-25680 · CVE-2026-25681 · CVE-2026-25934 · CVE-2026-27136 · CVE-2026-27141 · CVE-2026-27903 · CVE-2026-33540 · CVE-2026-33747 · CVE-2026-33748 · CVE-2026-33814 · CVE-2026-34986 · CVE-2026-35172 · CVE-2026-35469 · CVE-2026-39821 · CVE-2026-39827 · CVE-2026-39828 · CVE-2026-39829 · CVE-2026-39830 · CVE-2026-39831 · CVE-2026-39832 · CVE-2026-39833 · CVE-2026-39834 · CVE-2026-39835 · CVE-2026-39883 · CVE-2026-41506 · CVE-2026-41567 · CVE-2026-41568 · CVE-2026-42502 · CVE-2026-42506 · CVE-2026-42508 · CVE-2026-44740 · CVE-2026-45571 · CVE-2026-46595 · CVE-2026-46597 · CVE-2026-46598
openSUSE-SU-2025:15503-1: tailscale-1.86.5-1.1 on GA media
CVE-2025-58058
openSUSE-SU-2026:11514-1: containerized-data-importer1.66-api-1.66.0-1.1 on GA media
CVE-2025-47911 · CVE-2025-58058 · CVE-2025-58190 · CVE-2026-27136 · CVE-2026-34986 · CVE-2026-35469 · CVE-2026-39821 · CVE-2026-39827 · CVE-2026-39828 · CVE-2026-39832 · CVE-2026-42508 · CVE-2026-56852
openSUSE-SU-2025:20073-1: Security update for alloy
CVE-2025-11065 · CVE-2025-58058
- Source published
- Aug 28, 2025, 9:54:05 PM (timezone not stated)
- Source modified
- Aug 29, 2025, 1:23:07 PM (timezone not stated)
- Observed here
- 11 Nov 2026 03:36:12 UTC
- Source terms
- ENISA EUVD · source terms and attribution apply
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: euvd · ENISA EUVD · source terms and attribution apply. Source text is retained; field grouping and change labels are provided by ChangeIntel.
EUVD CVSS 3.1 · 5.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
nvd · CVE-2025-58058
Publishedxz 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.
NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.
Source analysis status: Deferred
Weakness classifications: CWE-770
Original publisher date fields
published: 2025-08-28T22:15:32.577
lastModified: 2026-09-26T00:10:00.127
- Source published
- 28 Aug 2025 22:15:32 UTC
- Source modified
- 26 Sep 2026 00:10:00 UTC
- Observed here
- 25 Oct 2026 03:17:18 UTC
- Source terms
- NIST NVD usage terms; underlying source attribution retained
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: nvd · NIST NVD usage terms; underlying source attribution retained. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS 3.1 · [email protected] · Secondary · 5.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
osv · GHSA-jc7w-c686-c4v9
Published### Summary 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](https://github.com/jljusten/LZMA-SDK/blob/master/DOC/lzma-specification.txt). Note that the code recognizes the issue later while reading the stream, but at this time the memory allocation has already been done. ### Mitigations The release v0.5.15 includes following mitigations: - The ReaderConfig DictCap field is now interpreted as a limit for the dictionary size. - The default is 2 Gigabytes - 1 byte (2^31-1 bytes). - Users can check with the [Reader.Header] method what the actual values are in their LZMA files and set a smaller limit using ReaderConfig. - The dictionary size will not exceed the larger of the file size and the minimum dictionary size. This is another measure to prevent huge memory allocations for the dictionary. - The code supports stream sizes only up to a pebibyte (1024^5). Note that the original v0.5.14 version had a compiler error for 32 bit platforms, which has been fixed by v0.5.15. ### Methods affected Only software that uses [lzma.NewReader](https://pkg.go.dev/github.com/ulikunitz/xz/lzma#NewReader) or [lzma.ReaderConfig.NewReader](https://pkg.go.dev/github.com/ulikunitz/xz/lzma#ReaderConfig.NewReader) is affected. There is no issue for software using the xz functionality. I thank @GregoryBuligin for his report, which is provided below. ### Summary When unpacking a large number of LZMA archives, even in a single goroutine, if the first byte of the archive file is 0 (a zero byte added to the beginning), an error __writeMatch: distance out of range__ occurs. Memory consumption spikes sharply, and the GC clearly cannot handle this situation. ### Details Judging by the error __writeMatch: distance out of range__, the problems occur in the code around this function. https://github.com/ulikunitz/xz/blob/c8314b8f21e9c5e25b52da07544cac14db277e89/lzma/decoderdict.go#L81 ### PoC Run a function similar to this one in 1 or several goroutines on a multitude of LZMA archives that have a 0 (a zero byte) added to the beginning. ``` const ProjectLocalPath = "some/path" const TmpDir = "tmp" func UnpackLZMA(lzmaFile string) error { file, err := os.Open(lzmaFile) if err != nil { return err } defer file.Close() reader, err := lzma.NewReader(bufio.NewReader(file)) if err != nil { return err } tmpFile, err := os.CreateTemp(TmpDir, TmpLZMAPrefix) if err != nil { return err } defer func() { tmpFile.Close() _ = os.Remove(tmpFile.Name()) }() sha256Hasher := sha256.New() multiWriter := io.MultiWriter(tmpFile, sha256Hasher) if _, err = io.Copy(multiWriter, reader); err != nil { return err } unpackHash := hex.EncodeToString(sha256Hasher.Sum(nil)) unpackDir := filepath.Join( ProjectLocalPath, unpackHash[:2], ) _ = os.MkdirAll(unpackDir, DirPerm) unpackPath := filepath.Join(unpackDir, unpackHash) return os.Rename(tmpFile.Name(), unpackPath) } ``` ### Impact Servers with a small amount of RAM that download and unpack a large number of unverified LZMA archives
- Source published
- 28 Aug 2025 19:36:22 UTC
- Source modified
- 10 Sep 2026 03:50:27 UTC
- Observed here
- 24 Oct 2026 13:19:41 UTC
- Source terms
- GitHub Advisory Database · CC-BY-4.0
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: osv · GitHub Advisory Database · CC-BY-4.0. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS_V3 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Publisher rating · MODERATE
osv · GO-2025-3922
PublishedMemory leaks when decoding a corrupted multiple LZMA archives in github.com/ulikunitz/xz
- Source published
- 17 Sep 2025 17:03:38 UTC
- Source modified
- 4 Feb 2026 03:52:11 UTC
- Observed here
- 24 Oct 2026 13:19:41 UTC
- Source terms
- OSV · upstream source license applies
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: osv · OSV · upstream source license applies. Source text is retained; field grouping and change labels are provided by ChangeIntel.