Skip to content

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

MediumCVSS 5.3 EPSS 0.46%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: no · technical impact: partial
Technology
UbuntuDebian

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.

Upgrade path

19 packages: 4 fixed, 8 partially fixed, 6 with no fix yet.

PackageAffectedFixed inStatus
debian/golang-github-ulikunitz-xz(Debian 12) = 0.5.6-2; = 0.5.12-1; = 0.5.15-1; All versions No fix listed No fix yet
debian/golang-github-ulikunitz-xz(Debian 13) = 0.5.6-2; = 0.5.12-1; = 0.5.15-1; All versions No fix listed No fix yet
ubuntu/golang-github-ulikunitz-xz(Ubuntu 22.04) All versions No fix listed No fix yet
ubuntu/golang-github-ulikunitz-xz(Ubuntu 24.04) All versions No fix listed No fix yet
ubuntu/golang-github-ulikunitz-xz(Ubuntu 26.04) All versions No fix listed No fix yet
ubuntu/golang-github-ulikunitz-xz(Ubuntu 26.10) All versions No fix listed No fix yet
azure linux containerized-data-importer(Azure Linux 3.0) < 1.57.0-16; All versions 1.57.0-16 Partially fixed
azure linux jx(Azure Linux 3.0) < 3.10.182-3; All versions 3.10.182-3 Partially fixed
cbl-mariner containerized-data-importer(CBL-Mariner 2.0) < 1.55.0-25; All versions 1.55.0-25 Partially fixed
cbl-mariner cri-o(CBL-Mariner 2.0) < 1.22.3-16; All versions 1.22.3-16 Partially fixed
cbl-mariner jx(CBL-Mariner 2.0) < 3.2.236-23; All versions 3.2.236-23 Partially fixed
cbl-mariner packer(CBL-Mariner 2.0) < 1.9.5-15; All versions 1.9.5-15 Partially fixed
cbl-mariner skopeo(CBL-Mariner 2.0) < 1.14.2-12; All versions 1.14.2-12 Partially fixed
cbl-mariner terraform(CBL-Mariner 2.0) < 1.3.2-27; All versions 1.3.2-27 Partially fixed
azure linux packer(Azure Linux 3.0) < 1.9.5-10 1.9.5-10 Fixed
azure linux skopeo(Azure Linux 3.0) < 1.14.4-6 1.14.4-6 Fixed
debian/golang-github-ulikunitz-xz(Debian 14) < 0.5.15-1; = 0.5.6-2; = 0.5.12-1 0.5.15-1 Fixed
ulikunitz github.com/ulikunitz/xz(Go) < 0.5.15; <= 0.5.13 0.5.15 Fixed
ulikunitz github.com/ulikunitz/xz = < 0.5.14 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
ulikunitz github.com/ulikunitz/xz(Go) < 0.5.15 0.5.15
cbl-mariner containerized-data-importer(CBL-Mariner:2.0) All versions No fix listed
cbl-mariner cri-o(CBL-Mariner:2.0) All versions No fix listed
cbl-mariner packer(CBL-Mariner:2.0) All versions No fix listed
cbl-mariner jx(CBL-Mariner:2.0) < 3.2.236-23 3.2.236-23
cbl-mariner packer(CBL-Mariner:2.0) < 1.9.5-15 1.9.5-15
cbl-mariner skopeo(CBL-Mariner:2.0) < 1.14.2-12 1.14.2-12
cbl-mariner terraform(CBL-Mariner:2.0) < 1.3.2-27 1.3.2-27
azure linux containerized-data-importer(Azure Linux:3.0) < 1.57.0-16 1.57.0-16
cbl-mariner containerized-data-importer(CBL-Mariner:2.0) < 1.55.0-25 1.55.0-25
azure linux jx(Azure Linux:3.0) < 3.10.182-3 3.10.182-3
azure linux packer(Azure Linux:3.0) < 1.9.5-10 1.9.5-10
azure linux skopeo(Azure Linux:3.0) < 1.14.4-6 1.14.4-6
cbl-mariner jx(CBL-Mariner:2.0) All versions No fix listed
cbl-mariner skopeo(CBL-Mariner:2.0) All versions No fix listed
azure linux containerized-data-importer(Azure Linux:3.0) All versions No fix listed
cbl-mariner terraform(CBL-Mariner:2.0) All versions No fix listed
azure linux jx(Azure Linux:3.0) All versions No fix listed
cbl-mariner cri-o(CBL-Mariner:2.0) < 1.22.3-16 1.22.3-16
debian/golang-github-ulikunitz-xz(Debian:12) All versions No fix listed
debian/golang-github-ulikunitz-xz(Debian:12) = 0.5.12-1 No fix listed
debian/golang-github-ulikunitz-xz(Debian:12) = 0.5.15-1 No fix listed
debian/golang-github-ulikunitz-xz(Debian:12) = 0.5.6-2 No fix listed
debian/golang-github-ulikunitz-xz(Debian:13) All versions No fix listed
debian/golang-github-ulikunitz-xz(Debian:13) = 0.5.12-1 No fix listed
Show 11 more
ProductAffected versionsFixed in
debian/golang-github-ulikunitz-xz(Debian:13) = 0.5.15-1 No fix listed
debian/golang-github-ulikunitz-xz(Debian:13) = 0.5.6-2 No fix listed
debian/golang-github-ulikunitz-xz(Debian:14) < 0.5.15-1 0.5.15-1
debian/golang-github-ulikunitz-xz(Debian:14) = 0.5.12-1 No fix listed
debian/golang-github-ulikunitz-xz(Debian:14) = 0.5.6-2 No fix listed
ulikunitz github.com/ulikunitz/xz(Go) <= 0.5.13 No fix listed
ulikunitz github.com/ulikunitz/xz = < 0.5.14 No fix listed
ubuntu/golang-github-ulikunitz-xz(Ubuntu:22.04) All versions No fix listed
ubuntu/golang-github-ulikunitz-xz(Ubuntu:24.04) All versions No fix listed
ubuntu/golang-github-ulikunitz-xz(Ubuntu:26.04) All versions No fix listed
ubuntu/golang-github-ulikunitz-xz(Ubuntu:26.10) All versions No fix listed

References