Security advisory
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-29482
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 11:16 UTC · Revision 1
Source evidence
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.
osv:CVE-2021-29482
Complete source record
{
"id": "f7b450645f61da50ab2140acf42f71a413e555f8c2123b86a149a7d61ca9a29b",
"url": "https://osv.dev/vulnerability/CVE-2021-29482",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-29482",
"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.",
"evidence": "osv:CVE-2021-29482",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2021-29482",
"aliases": [
"CVE-2021-29482",
"GHSA-25xm-hr59-7c27",
"GO-2020-0016"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/ulikunitz/xz",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "492fb8161cff03dd43fd938e40ecede6c6ffd8eb"
},
{
"fixed": "69c6093c7b2397b923acf82cb378f55ab2652b9b"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:xz_project:xz:*:*:*:*:*:go:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "0.5.8"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "69c6093c7b2397b923acf82cb378f55ab2652b9b"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"v0.5.7",
"v0.5.6",
"v0.5.5",
"v0.5.4",
"v0.5.3",
"v0.5.2",
"v0.5.1",
"v0.5",
"v0.4.1",
"v0.4",
"v0.3.1",
"v0.3",
"v0.2",
"v0.1"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-29482.json"
}
}
],
"modified": "2026-10-20T10:53:43.550254328Z",
"provider": "osv",
"references": [
"https://github.com/ulikunitz/xz/security/advisories/GHSA-25xm-hr59-7c27",
"https://github.com/ulikunitz/xz/commit/69c6093c7b2397b923acf82cb378f55ab2652b9b"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2021-29482",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 384545,
"published_at": "2021-04-28T19:15:08.587+00:00"
}