Every CVE Search/ Get API key

CVE-2021-29482

denial of service in github.com/ulikunitz/xz

7.5 HighFix available

xz is a compression and decompression library focusing on the xz format completely written in Go. The function readUvarint used to read the xz container format may not terminate a loop provide malicous input. The problem has been fixed in release v0.5.8. As a workaround users can limit the size of the compressed file input to a reasonable size for their use case. The standard library had recently the same issue and got the CVE-2020-16845 allocated.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

1.44%Up 0.8 points since Apr 29, 2021
90%50%10%1%

What each source reports

CVE List Score used 7.5

denial of service in github.com/ulikunitz/xz

xz is a compression and decompression library focusing on the xz format completely written in Go. The function readUvarint used to read the xz container format may not terminate a loop provide malicous input. The problem has been fixed in release v0.5.8. As a workaround users can limit the size of the compressed file input to a reasonable size for their use case. The standard library had recently the same issue and got the CVE-2020-16845 allocated.

Record
CVE-2021-29482
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-835
Updated
2026-11-02
EUVDEUVD-2021-0896 7.5

xz is a compression and decompression library focusing on the xz format completely written in Go. The function readUvarint used to read the xz container format may not terminate a loop provide malicous input. The problem has been fixed in release v0.5.8. As a workaround users can limit the size of the compressed file input to a reasonable size for their use case. The standard library had recently the same issue and got the CVE-2020-16845 allocated.

Record
EUVD-2021-0896
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-03
GitHub AdvisoriesGHSA-25xm-hr59-7c27 7.5

github.com/ulikunitz/xz fixes readUvarint Denial of Service (DoS)

Impact

xz is a compression and decompression library focusing on the xz format completely written in Go. The function readUvarint used to read the xz container format may not terminate a loop provide malicous input.

Patches

The problem has been fixed in release v0.5.8.

Workarounds

Limit the size of the compressed file input to a reasonable size for your use case.

References

The standard library had recently the same issue and got the CVE-2020-16845 allocated.

For more information

If you have any questions or comments about this advisory:

  • Open an issue in xz.
Record
GHSA-25xm-hr59-7c27
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-835
Updated
2026-11-02
NVD 7.5

xz is a compression and decompression library focusing on the xz format completely written in Go. The function readUvarint used to read the xz container format may not terminate a loop provide malicous input. The problem has been fixed in release v0.5.8. As a workaround users can limit the size of the compressed file input to a reasonable size for their use case. The standard library had recently the same issue and got the CVE-2020-16845 allocated.

Record
CVE-2021-29482
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 2.0
5.0 MediumAV:N/AC:L/Au:N/C:N/I:N/A:P
Weakness
CWE-835
Updated
2026-11-02
OSV 7.5

xz is a compression and decompression library focusing on the xz format completely written in Go. The function readUvarint used to read the xz container format may not terminate a loop provide malicous input. The problem has been fixed in release v0.5.8. As a workaround users can limit the size of the compressed file input to a reasonable size for their use case. The standard library had recently the same issue and got the CVE-2020-16845 allocated.

Record
CVE-2021-29482
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2021-29482 7.5

xz is a compression and decompression library focusing on the xz format completely written in Go. The function readUvarint used to read the xz container format may not terminate a loop provide malicous input. The problem has been fixed in release v0.5.8. As a workaround users can limit the size of the compressed file input to a reasonable size for their use case. The standard library had recently the same issue and got the CVE-2020-16845 allocated.

Record
DEBIAN-CVE-2021-29482
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
Show 4 moreShow less
OSVGHSA-25xm-hr59-7c27 7.5

github.com/ulikunitz/xz fixes readUvarint Denial of Service (DoS)

Impact

xz is a compression and decompression library focusing on the xz format completely written in Go. The function readUvarint used to read the xz container format may not terminate a loop provide malicous input.

Patches

The problem has been fixed in release v0.5.8.

Workarounds

Limit the size of the compressed file input to a reasonable size for your use case.

References

The standard library had recently the same issue and got the CVE-2020-16845 allocated.

For more information

If you have any questions or comments about this advisory:

  • Open an issue in xz.
Record
GHSA-25xm-hr59-7c27
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-835
Updated
2026-11-02
OSVRHSA-2022:1276 9.4

Red Hat Security Advisory: Red Hat OpenShift Service Mesh 2.0.9 security update

Record
RHSA-2022:1276
CVSS 3.1
9.4 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
Updated
2026-11-02
OSVUBUNTU-CVE-2021-29482 7.5

xz is a compression and decompression library focusing on the xz format completely written in Go. The function readUvarint used to read the xz container format may not terminate a loop provide malicous input. The problem has been fixed in release v0.5.8. As a workaround users can limit the size of the compressed file input to a reasonable size for their use case. The standard library had recently the same issue and got the CVE-2020-16845 allocated.

Record
UBUNTU-CVE-2021-29482
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVGO-2020-0016 No score

Infinite loop in github.com/ulikunitz/xz

An attacker can construct a series of bytes such that calling Reader.Read on the bytes could cause an infinite loop. If parsing user supplied input, this may be used as a denial of service vector.

Record
GO-2020-0016
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
github.com/ulikunitz/xz
Go
before 0.5.8
0.5.8
golang-github-ulikunitz-xz
Debian:12
before 0.5.6-2
0.5.6-2
golang-github-ulikunitz-xz
Debian:13
before 0.5.6-2
0.5.6-2
golang-github-ulikunitz-xz
Debian:14
before 0.5.6-2
0.5.6-2
servicemesh
Red Hat:service_mesh:2.0::el8
From an advisory covering 16 CVEs
before 0:2.0.9-3.el8
0:2.0.9-3.el8
servicemesh-istioctl
Red Hat:service_mesh:2.0::el8
From an advisory covering 16 CVEs
before 0:2.0.9-3.el8
0:2.0.9-3.el8
servicemesh-mixc
Red Hat:service_mesh:2.0::el8
From an advisory covering 16 CVEs
before 0:2.0.9-3.el8
0:2.0.9-3.el8
servicemesh-mixs
Red Hat:service_mesh:2.0::el8
From an advisory covering 16 CVEs
before 0:2.0.9-3.el8
0:2.0.9-3.el8
servicemesh-pilot-agent
Red Hat:service_mesh:2.0::el8
From an advisory covering 16 CVEs
before 0:2.0.9-3.el8
0:2.0.9-3.el8
servicemesh-pilot-discovery
Red Hat:service_mesh:2.0::el8
From an advisory covering 16 CVEs
before 0:2.0.9-3.el8
0:2.0.9-3.el8
Show 8 moreShow less
Affected packages
PackageAffectedFixed
kiali
Red Hat:service_mesh:2.0::el8
From an advisory covering 16 CVEs
before 0:v1.24.7.redhat1-1.el8
0:v1.24.7.redhat1-1.el8
servicemesh-prometheus
Red Hat:service_mesh:2.0::el8
From an advisory covering 16 CVEs
before 0:2.14.0-16.el8.1
0:2.14.0-16.el8.1
servicemesh-proxy
Red Hat:service_mesh:2.0::el8
From an advisory covering 16 CVEs
before 0:2.0.9-3.el8
0:2.0.9-3.el8
golang-github-ulikunitz-xz
Ubuntu:20.04:LTS
All versions, plus listed versions
0.5.6-1
None known
golang-github-ulikunitz-xz
Ubuntu:22.04:LTS
All versions, plus listed versions
0.5.6-2
None known
golang-github-ulikunitz-xz
Ubuntu:24.04:LTS
All versions, plus listed versions
0.5.6-2
None known
golang-github-ulikunitz-xz
Ubuntu:25.10
All versions, plus listed versions
0.5.6-2
None known
golang-github-ulikunitz-xz
Ubuntu:26.04:LTS
All versions, plus listed versions
0.5.6-20.5.15-1
None known

History

History
RecordedChangedSources
affected, facts
aliases, productsEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-29482 is a high vulnerability (CVSS 7.5) in Tukaani-project Xz, published April 14, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.44%, the 73rd percentile. Fixed in github.com/ulikunitz/xz 0.5.8.

References

Show 80 moreShow less
MoveEnter Open