CVE-2021-29482
HIGH 7.5CVSS 3.1github.com/ulikunitz/xz fixes readUvarint Denial of Service (DoS)
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.
- Published
- 28 Apr 2021
- Last modified
- 8 Jul 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-835
- Also known as
- GHSA-25xm-hr59-7c27GO-2020-0016
- Sources
- NVDJSONOSV GHSA-25xm-hr59-7c27JSONOSV GO-2020-0016JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | xz_project | xzcpe:2.3:a:xz_project:xz:*:*:*:*:*:go:*:* |
< 0.5.8 | 0.5.8 |
| OSV | Go | github.com/ulikunitz/xz | < 0.5.8 | 0.5.8 |
References
- https://github.com/ulikunitz/xz/commit/69c6093c7b2397b923acf82cb378f55ab2652b9b · Patch, Third Party Advisory, WEB, FIX
- https://github.com/ulikunitz/xz/security/advisories/GHSA-25xm-hr59-7c27 · Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-29482 · ADVISORY
- https://github.com/ulikunitz/xz/issues/35 · WEB
- https://pkg.go.dev/vuln/GO-2020-0016 · WEB
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 28 Apr 2021)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 14 Apr 2021)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 25 May 2021)