CVE-2025-58058
Medium · 5.3CVSS
5.3
EPSS
0.4%
Published
Aug 28, 2025
CISA due date
—
Cloudanix analysis
A Go library that reads certain compressed files can be tricked into using far too much memory, which may slow down or crash the program that uses it.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Low
- Patch risk
- Low
What it actually does
In ulikunitz/xz before 0.5.14, the LZMA decoder allocates the full decode buffer immediately after parsing the stream header. LZMA headers have no magic number or checksum, so bytes placed in front of a valid or crafted LZMA stream are not rejected at header-parse time. A header that advertises a large dictionary or buffer therefore causes a large allocation before the decoder later fails while reading the body, producing unbounded or excessive memory use in any process that decompresses untrusted xz/LZMA input with this library. Confidentiality and integrity are unaffected; impact is availability only.
Why it matters to the business
Services that decompress untrusted xz or LZMA data with this Go module can suffer memory spikes, out-of-memory crashes, restarts, or reduced capacity. There is no data-theft or tampering impact. Likelihood is low: EPSS is about 0.43% with only a slight 30-day rise, the issue is not in CISA KEV, it is not associated with ransomware, exploit maturity is none, and it has been public for over a year. Residual risk remains for any Go application or downstream module that still vendors a vulnerable ulikunitz/xz until it is upgraded and rebuilt.
How an attack unfolds
An unauthenticated attacker who can get a vulnerable application to decompress attacker-controlled xz or LZMA bytes supplies a stream whose LZMA header fields imply a large decoding buffer, optionally with extra data prepended so the header is still accepted. The library allocates the full buffer on header read and only later detects that the stream is invalid. One oversized allocation or repeated submissions can exhaust process or host memory and stall or crash the service. No privileges or user interaction are required if the application already decompresses untrusted input. There are no named threat actors or known in-the-wild campaigns for this CVE.
How to fix it
Upgrade github.com/ulikunitz/xz to 0.5.14 or later (fix commit 7184815834c4777e8fa665946721d5fe114c2c35), update go.mod/go.sum, and rebuild all binaries and container images that embed the module. Inventory Go services and transitive dependents that import ulikunitz/xz and pin the patched version. Until rebuilt, constrain untrusted compressed input size, apply process memory limits (cgroups, GOMEMLIMIT, ulimits), and avoid decompressing untrusted xz/LZMA with the vulnerable library.
How to confirm the fix worked
Confirm go.mod and go.sum require github.com/ulikunitz/xz at 0.5.14 or later, or that the module resolves to commit 7184815834c4777e8fa665946721d5fe114c2c35. Run govulncheck or equivalent SCA against source and built binaries. Inspect deployed images and GOPATH/pkg module caches for older versions. After upgrade, decompress oversized and header-malformed LZMA samples in a staging environment and verify memory stays bounded and the decoder rejects bad headers without a large allocation.
Typical attack path
- Find an application, API, or tool that decompresses xz or LZMA using ulikunitz/xz older than 0.5.14.
- Prepare an LZMA stream whose header requests a large decode buffer, with optional leading bytes that are not rejected at header parse.
- Deliver that stream on any path the application decompresses (upload, archive, message, or network payload).
- Cause the library to parse the header and allocate the full buffer before the stream is rejected.
- Repeat or size the allocation until the process is memory-starved, restarted, or taken offline.
How to detect it
There is no public exploit and no named actor activity, so confirmed compromise is unlikely; look for availability artifacts rather than a unique payload. Review process and host metrics for sudden RSS/heap growth or OOM kills in Go services that decompress xz/LZMA around the time of untrusted uploads or archive processing. Check application and runtime logs for LZMA/xz decode failures that follow a large allocation, container OOMKilled events, and Kubernetes/node memory pressure. Compare those events to inbound compressed objects. Absence of distinctive malware artifacts means memory and decode-error correlation is the practical hunt.
What your security team should do
- Inventory all Go modules, binaries, and images that import github.com/ulikunitz/xz and flag versions before 0.5.14.
- Upgrade to 0.5.14 (commit 7184815834c4777e8fa665946721d5fe114c2c35), rebuild, and redeploy as a standard patch cycle—this is not a KEV emergency.
- Enforce SCA/govulncheck gates so vulnerable ulikunitz/xz cannot re-enter CI.
- Apply memory limits and compressed-input size caps on any service that still decompresses untrusted xz/LZMA.
- Prioritize internet-facing decompress paths first; treat internal batch tools as lower urgency given low EPSS and no known exploitation.
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Go | github.com/ulikunitz/xz | 0 | 0.5.15 |
| Chainguard | atlantis-fips | 0 | 0.35.1-r3 |
| Chainguard | bootc-image-builder | 0 | 0_git20250828085034-r1 |
| Chainguard | cg | 0 | 0_git20250819-r1 |
| Chainguard | chainctl | 0 | 0.2.135-r0 |
| Chainguard | cloudbeat | 0 | 9.1.3-r1 |
| Chainguard | cloudbeat-fips | 0 | 9.1.3-r1 |
| Chainguard | conftest-fips | 0 | 0.62.0-r5 |
| Chainguard | crossplane-provider-terraform | 0 | 1.0.0-r1 |
| Chainguard | crossplane-provider-terraform-compat | 0 | 1.0.0-r1 |
| Chainguard | datadog-agent-core-integrations-fips | 0 | 7.69.4-r4 |
| Chainguard | datadog-agent-fakeintake-fips | 0 | 7.69.4-r4 |
| Chainguard | datadog-agent-fips | 0 | 7.69.4-r4 |
| Chainguard | datadog-agent-jmx-fips | 0 | 7.69.4-r4 |
| Chainguard | datadog-agent-oci-compat-fips | 0 | 7.69.4-r4 |
| Chainguard | datadog-agent-s6-overlay-fips | 0 | 7.69.4-r4 |
| Chainguard | datadog-cluster-agent | 0 | 7.69.4-r4 |
| Chainguard | datadog-cluster-agent-fips | 0 | 7.69.4-r4 |
| Chainguard | datadog-cluster-agent-oci-compat | 0 | 7.69.4-r4 |
| Chainguard | datadog-cluster-agent-oci-compat-fips | 0 | 7.69.4-r4 |
| Chainguard | docker-credential-cgr | 0 | 0.2.135-r0 |
| Chainguard | envoy-gateway | 0 | 1.5.0-r3 |
| Chainguard | envoy-gateway-compat | 0 | 1.5.0-r3 |
| Chainguard | envoy-gateway-egctl | 0 | 1.5.0-r3 |
| Chainguard | envoy-gateway-fips | 0 | 1.5.0-r2 |
| Chainguard | envoy-gateway-fips-egctl | 0 | 1.5.0-r2 |
| Chainguard | falco | 0 | 0.42.0-r0 |
| Chainguard | falco-dev | 0 | 0.42.0-r0 |
| Chainguard | falco-src | 0 | 0.42.0-r0 |
| Chainguard | filebrowser | 0 | 2.42.5-r1 |
| Chainguard | filebrowser-compat | 0 | 2.42.5-r1 |
| Chainguard | gitea-fips | 0 | 1.24.5-r2 |
| Chainguard | gitea-fips-compat | 0 | 1.24.5-r2 |
| Chainguard | gitleaks | 0 | 8.28.0-r2 |
| Chainguard | google-osconfig-agent | 0 | 20250520.00-r4 |
| Chainguard | gotenberg | 0 | 8.22.0-r1 |
| Chainguard | gptscript | 0 | 0.9.5-r15 |
| Chainguard | grafana-alloy | 0 | 1.10.2-r3 |
| Chainguard | grafana-alloy-compat | 0 | 1.10.2-r3 |
| Chainguard | grafana-alloy-fips | 0 | 1.10.2-r3 |
| Chainguard | grype-db | 0 | 0.39.0-r1 |
| Chainguard | grype-db-manager | 0 | 0.39.0-r1 |
| Chainguard | grype-fips | 0 | 0.99.0-r1 |
| Chainguard | guac | 0 | 1.0.0-r5 |
| Chainguard | guaccsub | 0 | 1.0.0-r5 |
| Chainguard | guacgql | 0 | 1.0.0-r5 |
| Chainguard | guacingest | 0 | 1.0.0-r5 |
| Chainguard | guacone | 0 | 1.0.0-r5 |
| Chainguard | k9s | 0 | 0.50.9-r8 |
| Chainguard | k9s-fips | 0 | 0.50.9-r7 |
| Chainguard | kubescape-operator | 0 | 0.2.103-r1 |
| Chainguard | kubescape-operator-fips | 0 | 0.2.103-r0 |
| Chainguard | mattermost-10.12 | 0 | 10.12.0-r1 |
| Chainguard | mattermost-10.12-compat | 0 | 10.12.0-r1 |
| Chainguard | mattermost-10.3 | 0 | 10.3.4-r12 |
| Chainguard | mattermost-10.3-compat | 0 | 10.3.4-r12 |
| Chainguard | mattermost-10.4 | 0 | 10.4.5-r6 |
| Chainguard | mattermost-10.4-compat | 0 | 10.4.5-r6 |
| Chainguard | mattermost-10.5 | 0 | 10.5.10-r1 |
| Chainguard | mattermost-10.5-compat | 0 | 10.5.10-r1 |
| Chainguard | mattermost-10.6 | 0 | 10.6.6-r5 |
| Chainguard | mattermost-10.6-compat | 0 | 10.6.6-r5 |
| Chainguard | mattermost-10.7 | 0 | 10.7.4-r3 |
| Chainguard | mattermost-10.7-compat | 0 | 10.7.4-r3 |
| Chainguard | mattermost-10.8 | 0 | 10.8.4-r2 |
| Chainguard | mattermost-10.8-compat | 0 | 10.8.4-r2 |
| Chainguard | mattermost-10.9 | 0 | 10.9.5-r1 |
| Chainguard | mattermost-10.9-compat | 0 | 10.9.5-r1 |
| Chainguard | mattermost-9.11 | 0 | 9.11.18-r2 |
| Chainguard | mattermost-9.11-compat | 0 | 9.11.18-r2 |
| Chainguard | mattermost-fips-10.10 | 0 | 10.10.2-r2 |
| Chainguard | mattermost-fips-10.10-compat | 0 | 10.10.2-r2 |
| Chainguard | mattermost-fips-10.11 | 0 | 10.11.2-r2 |
| Chainguard | mattermost-fips-10.11-compat | 0 | 10.11.2-r2 |
| Chainguard | mattermost-fips-10.12 | 0 | 10.12.0-r1 |
| Chainguard | mattermost-fips-10.12-compat | 0 | 10.12.0-r1 |
| Chainguard | mattermost-fips-10.5 | 0 | 10.5.10-r1 |
| Chainguard | mattermost-fips-10.5-compat | 0 | 10.5.10-r1 |
| Chainguard | mattermost-fips-10.6 | 0 | 10.6.6-r5 |
| Chainguard | mattermost-fips-10.6-compat | 0 | 10.6.6-r5 |
| Chainguard | mattermost-fips-10.7 | 0 | 10.7.4-r3 |
| Chainguard | mattermost-fips-10.7-compat | 0 | 10.7.4-r3 |
| Chainguard | mattermost-fips-10.8 | 0 | 10.8.4-r2 |
| Chainguard | mattermost-fips-10.8-compat | 0 | 10.8.4-r2 |
| Chainguard | mattermost-fips-10.9 | 0 | 10.9.5-r1 |
| Chainguard | mattermost-fips-10.9-compat | 0 | 10.9.5-r1 |
| Chainguard | mattermost-fips-9.11 | 0 | 9.11.18-r2 |
| Chainguard | mattermost-fips-9.11-compat | 0 | 9.11.18-r2 |
| Chainguard | nsc | 0 | 2.11.1-r1 |
| Chainguard | nsc-fips | 0 | 2.11.1-r1 |
| Chainguard | nuclei | 0 | 3.4.10-r1 |
| Chainguard | opentofu-1.10 | 0 | 1.10.5-r4 |
| Chainguard | opentofu-1.10-compat | 0 | 1.10.5-r4 |
| Chainguard | opentofu-1.10-local-provider-config | 0 | 1.10.5-r4 |
| Chainguard | opentofu-1.7 | 0 | 1.7.10-r4 |
| Chainguard | opentofu-1.7-compat | 0 | 1.7.10-r4 |
| Chainguard | opentofu-1.7-local-provider-config | 0 | 1.7.10-r4 |
| Chainguard | opentofu-1.8 | 0 | 1.8.11-r4 |
| Chainguard | opentofu-1.8-compat | 0 | 1.8.11-r4 |
| Chainguard | opentofu-1.8-local-provider-config | 0 | 1.8.11-r4 |
| Chainguard | opentofu-1.9 | 0 | 1.9.3-r4 |
| Chainguard | opentofu-1.9-compat | 0 | 1.9.3-r4 |
| Chainguard | opentofu-1.9-local-provider-config | 0 | 1.9.3-r4 |
| Chainguard | opentofu-fips-1.10 | 0 | 1.10.5-r4 |
| Chainguard | opentofu-fips-1.7 | 0 | 1.7.10-r4 |
| Chainguard | opentofu-fips-1.8 | 0 | 1.8.11-r4 |
| Chainguard | opentofu-fips-1.9 | 0 | 1.9.3-r4 |
| Chainguard | packer | 0 | 1.14.1-r2 |
| Chainguard | packer-compat | 0 | 1.14.1-r2 |
| Chainguard | packer-fips | 0 | 1.14.1-r2 |
| Chainguard | podman | 0 | 5.6.0-r1 |
| Chainguard | podman-doc | 0 | 5.6.0-r1 |
| Chainguard | prometheus-podman-exporter | 0 | 1.18.0-r1 |
| Chainguard | prometheus-podman-exporter-compat | 0 | 1.18.0-r1 |
| Chainguard | prometheus-podman-exporter-fips | 0 | 1.18.0-r1 |
| Chainguard | rancher-fleet | 0 | 0.13.1-r1 |
| Chainguard | rancher-fleet-agent | 0 | 0.13.1-r1 |
| Chainguard | rancher-fleet-agent-fips | 0 | 0.13.1-r1 |
| Chainguard | rancher-fleet-cli | 0 | 0.13.1-r1 |
| Chainguard | rancher-fleet-cli-fips | 0 | 0.13.1-r1 |
| Chainguard | rancher-fleet-controller | 0 | 0.13.1-r1 |
| Chainguard | rancher-fleet-controller-fips | 0 | 0.13.1-r1 |
| Chainguard | rancher-fleet-fips | 0 | 0.13.1-r1 |
| Chainguard | rancher-fleet-fips-agent | 0 | 0.13.1-r1 |
| Chainguard | rancher-fleet-termination-log | 0 | 0.13.1-r1 |
| Chainguard | regclient-fips | 0 | 0.9.2-r0 |
| Chainguard | regclient-regbot-fips | 0 | 0.9.2-r0 |
| Chainguard | regclient-regctl-fips | 0 | 0.9.2-r0 |
| Chainguard | regclient-regsync-fips | 0 | 0.9.2-r0 |
| Chainguard | skopeo-fips | 0 | 1.20.0-r2 |
| Chainguard | steampipe | 0 | 2.1.0-r6 |
| Chainguard | syft-fips | 0 | 1.32.0-r1 |
| Chainguard | terraform | 0 | 1.5.7-r32 |
| Chainguard | terraform-1.10 | 0 | 1.10.5-r13 |
| Chainguard | terraform-1.10-compat | 0 | 1.10.5-r13 |
| Chainguard | terraform-1.10-local-provider-config | 0 | 1.10.5-r13 |
| Chainguard | terraform-1.11 | 0 | 1.11.4-r8 |
| Chainguard | terraform-1.11-compat | 0 | 1.11.4-r8 |
| Chainguard | terraform-1.11-local-provider-config | 0 | 1.11.4-r8 |
| Chainguard | terraform-1.12 | 0 | 1.12.2-r5 |
| Chainguard | terraform-1.12-compat | 0 | 1.12.2-r5 |
| Chainguard | terraform-1.12-local-provider-config | 0 | 1.12.2-r5 |
| Chainguard | terraform-1.13 | 0 | 1.13.1-r1 |
| Chainguard | terraform-1.13-compat | 0 | 1.13.1-r1 |
| Chainguard | terraform-1.13-local-provider-config | 0 | 1.13.1-r1 |
| Chainguard | terraform-1.9 | 0 | 1.9.8-r18 |
| Chainguard | terraform-1.9-compat | 0 | 1.9.8-r18 |
| Chainguard | terraform-1.9-local-provider-config | 0 | 1.9.8-r18 |
| Chainguard | terraform-compat | 0 | 1.5.7-r32 |
| Chainguard | terraform-fips-1.10 | 0 | 1.10.5-r14 |
| Chainguard | terraform-fips-1.10-compat | 0 | 1.10.5-r14 |
| Chainguard | terraform-fips-1.10-local-provider-config | 0 | 1.10.5-r14 |
| Chainguard | terraform-fips-1.11 | 0 | 1.11.4-r8 |
| Chainguard | terraform-fips-1.11-compat | 0 | 1.11.4-r8 |
| Chainguard | terraform-fips-1.11-local-provider-config | 0 | 1.11.4-r8 |
| Chainguard | terraform-fips-1.13 | 0 | 1.13.1-r1 |
| Chainguard | terraform-fips-1.13-compat | 0 | 1.13.1-r1 |
| Chainguard | terraform-fips-1.13-local-provider-config | 0 | 1.13.1-r1 |
| Chainguard | terraform-local-provider-config | 0 | 1.5.7-r32 |
| Chainguard | terragrunt | 0 | 0.86.2-r1 |
| Chainguard | terragrunt-docs | 0 | 0.86.2-r1 |
| Chainguard | tflint | 0 | 0.58.1-r5 |
| Chainguard | tflint-compat | 0 | 0.58.1-r5 |
| Chainguard | trivy | 0 | 0.65.0-r5 |
| Chainguard | trivy-fips | 0 | 0.65.0-r5 |
| Chainguard | trivy-operator | 0 | 0.28.0-r3 |
| Chainguard | trivy-operator-fips | 0 | 0.28.0-r5 |
| Chainguard | trufflehog | 0 | 3.90.5-r1 |
| Chainguard | trufflehog-fips | 0 | 3.90.5-r1 |
| Chainguard | undock | 0 | 0.10.0-r4 |
| Chainguard | vault-1.16 | 0 | 1.16.3-r24 |
| Chainguard | vault-1.16-compat | 0 | 1.16.3-r24 |
| Chainguard | vcluster | 0 | 0.27.0-r1 |
| Chainguard | vcluster-cli | 0 | 0.27.0-r1 |
| Chainguard | vcluster-syncer | 0 | 0.27.0-r1 |
| Chainguard | xeol | 0 | 0.10.8-r13 |
| Chainguard | xeol-compat | 0 | 0.10.8-r13 |
| Chainguard | xeol-fips | 0 | 0.10.8-r13 |
| Chainguard | zarf | 0 | 0.61.0-r1 |
| Chainguard | zot | 0 | 2.1.7-r4 |
| Debian:11 | golang-github-ulikunitz-xz | 0 | No fix |
| Debian:12 | golang-github-ulikunitz-xz | 0 | No fix |
| Debian:13 | golang-github-ulikunitz-xz | 0 | No fix |
| Debian:14 | golang-github-ulikunitz-xz | 0 | No fix |
| SUSE:Linux Enterprise Module for Basesystem 15 SP7 | rekor | 0 | 1.4.3-150400.4.28.1 |
| SUSE:Linux Enterprise Module for HPC 15 SP6 | warewulf4 | 0 | 4.6.4-150500.6.37.1 |
| SUSE:Linux Enterprise Module for HPC 15 SP7 | warewulf4 | 0 | 4.6.4-150500.6.37.1 |
| SUSE:Linux Enterprise Module for Package Hub 15 SP6 | govulncheck-vulndb | 0 | 0.0.20250918T182144-150000.1.107.1 |
| Wolfi | datadog-cluster-agent | 0 | 7.69.4-r4 |
| Wolfi | datadog-cluster-agent-oci-compat | 0 | 7.69.4-r4 |
| Wolfi | envoy-gateway | 0 | 1.5.0-r3 |
| Wolfi | envoy-gateway-compat | 0 | 1.5.0-r3 |
| Wolfi | envoy-gateway-egctl | 0 | 1.5.0-r3 |
| Wolfi | falco | 0 | 0.42.0-r0 |
| Wolfi | falco-dev | 0 | 0.42.0-r0 |
| Wolfi | falco-src | 0 | 0.42.0-r0 |
| Wolfi | filebrowser | 0 | 2.42.5-r1 |
| Wolfi | filebrowser-compat | 0 | 2.42.5-r1 |
| Wolfi | gitleaks | 0 | 8.28.0-r2 |
| Wolfi | gptscript | 0 | 0.9.5-r15 |
Related vulnerabilities
- CVE-2026-27142 Actions which insert URLs into the content attribute of HTML meta tags are not escaped. Also affects atlantis-fips
- CVE-2026-27139 On Unix platforms, when listing the contents of a directory using File.ReadDir or… Also affects atlantis-fips
- CVE-2026-25679 url.Parse insufficiently validated the host/authority component and accepted some invalid… Also affects atlantis-fips
- CVE-2026-1229 The CombinedMult function in the CIRCL ecc/p384 package (secp384r1 curve) produces an… Also affects atlantis-fips
- CVE-2025-68121 During session resumption in crypto/tls, if the underlying Config has its ClientCAs or… Also affects atlantis-fips
- CVE-2025-61732 A discrepancy between how Go and C/C++ comments were parsed allowed for code smuggling… Also affects atlantis-fips
- CVE-2025-47914 golang.org/x/crypto/ssh/agent vulnerable to panic if message is malformed due to out of… Also affects atlantis-fips
- CVE-2025-58181 golang.org/x/crypto/ssh allows an attacker to cause unbounded memory consumption Also affects atlantis-fips