{"id":"CVE-2021-29482","aliases":["CVE-2021-29482","GHSA-25xm-hr59-7c27","GO-2020-0016"],"related":[],"kind":"vulnerability","state":"published","title":"denial of service in github.com/ulikunitz/xz","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nxz 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.\n\n### Patches\n\nThe problem has been fixed in release v0.5.8.\n\n### Workarounds\n\nLimit the size of the compressed file input to a reasonable size for your use case.\n\n### References\n\nThe standard library had recently the same issue and got the [CVE-2020-16845](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-16845) allocated.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [xz](https://github.com/ulikunitz/xz/issues).","format":"markdown","source":"ghsa"},{"lang":"en","text":"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.","format":"markdown","source":"go"},{"lang":"es","text":"xz es una biblioteca de compresión y descompresión que se centra en el formato xz escrito completamente en Go.&#xa0;La función readUvarint utilizada para leer el formato contenedor xz no puede terminar un bucle y proporcionar una entrada maliciosa.&#xa0;El problema ha sido corregido en la versión v0.5.8.&#xa0;Como solución alternativa, los usuarios pueden limitar el tamaño de la entrada del archivo comprimido a un tamaño razonable para su caso de uso.&#xa0;La biblioteca estándar tuvo recientemente el mismo problema y se le asignó el CVE-2020-16845","source":"nvd"}],"published":"2021-04-14T20:04:52.000Z","modified":"2026-07-08T06:27:46.198Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","score":5,"rating":"MEDIUM"}],"cwes":["CWE-835"],"affected":[{"ranges":[{"version":"< 0.5.8","status":"affected"}],"vendor":"ulikunitz","product":"xz","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.5.8"}],"ecosystem":"Go","package":"github.com/ulikunitz/xz","purl":"pkg:golang/github.com/ulikunitz/xz","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.5.8"}],"ecosystem":"Go","package":"github.com/ulikunitz/xz","purl":"pkg:golang/github.com/ulikunitz/xz","source":"go"},{"ranges":[{"status":"affected","fixed":"0.5.8"}],"vendor":"xz_project","product":"xz","cpe":"cpe:2.3:a:xz_project:xz:*:*:*:*:*:go:*:*","source":"nvd"}],"references":[{"url":"https://github.com/ulikunitz/xz/security/advisories/GHSA-25xm-hr59-7c27","tags":["third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ulikunitz/xz/commit/69c6093c7b2397b923acf82cb378f55ab2652b9b","tags":["fix","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-29482","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/ulikunitz/xz/issues/35","tags":["web"],"sources":["ghsa","go"]},{"url":"https://pkg.go.dev/vuln/GO-2020-0016","tags":["web"],"sources":["ghsa"]}],"credits":["@0xdecaf"],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-29482","url":"https://www.cve.org/CVERecord?id=CVE-2021-29482","licence":"CVE Terms of Use","modified":"2024-08-03T22:11:05.477Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-25xm-hr59-7c27","url":"https://github.com/advisories/GHSA-25xm-hr59-7c27","licence":"CC-BY-4.0","modified":"2026-07-08T06:27:46.198Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2020-0016","url":"https://pkg.go.dev/vuln/GO-2020-0016","licence":"CC-BY-4.0","modified":"2024-05-20T16:03:47.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-29482","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-29482","licence":"Public domain","modified":"2026-06-17T03:47:44.000Z"}],"updatedAt":"2026-11-25T22:58:01.078Z","epss":{"score":0.01519,"percentile":0.75342,"date":"2026-12-02T12:00:21.000Z"}}