Vulnerabilities in pkg:golang/github.com/ulikunitz/xz
PACKAGECVE-2020-16845 is a HIGH (CVSS 7.5) infinite loop vulnerability (CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')) affecting Withdrawn Advisory libraries in the Go ecosystem. The issue involves infinite loop in xz. Remediation is available by upgrading affected packages to version 0.5.8.
pkg:golang/github.com/ulikunitz/xz
Vulnerability advisories affecting package pkg:golang/github.com/ulikunitz/xz. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-q6gq-997w-f55g | CVE-2020-16845 | HIGH | Withdrawn Advisory: Infinite loop in xz |
| GHSA-jc7w-c686-c4v9 | CVE-2025-58058 | MODERATE | github.com/ulikunitz/xz leaks memory when decoding a corrupted multiple LZMA archives |
| GHSA-25xm-hr59-7c27 | CVE-2021-29482 | HIGH | github.com/ulikunitz/xz fixes readUvarint Denial of Service (DoS) |
CVE-2020-16845 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2020-16845
To remediate this vulnerability, upgrade all affected Withdrawn Advisory dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/ulikunitz/xz to 0.5.8
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/ulikunitz/xz
How to Check if You Are Affected
To determine whether your application is affected by CVE-2020-16845, inspect your project dependencies for Withdrawn Advisory:
inspect dependencies for github.com/ulikunitz/xz
Analyze the terminal output to locate any version of Withdrawn Advisory in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.5.8), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop'), where the product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. In Withdrawn Advisory, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-16845 Affected Withdrawn Advisory Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/ulikunitz/xz
|
Go |
< 0.5.8
|
0.5.8
|
References
Frequently Asked Questions
What is CVE-2020-16845?
Which Withdrawn Advisory versions are affected?
What version fixes CVE-2020-16845?
Is github.com/ulikunitz/xz affected?
What is the CVSS score of CVE-2020-16845?
What CWE is associated with CVE-2020-16845?
How can I check Go dependencies for CVE-2020-16845?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-q6gq-997w-f55g",
"modified" : "2025-10-14T19:37:19Z",
"published" : "2021-12-16T19:16:40Z",
"withdrawn" : "2025-10-14T19:37:18Z",
"aliases" : [ "CVE-2020-16845" ],
"summary" : "Withdrawn Advisory: Infinite loop in xz",
"details" : "### Withdrawn Advisory\nThis advisory has been withdrawn because alerts cannot be issued for the Go standard library at this time.\n\n### Original Description\nGo before 1.13.15 and 14.x before 1.14.7 can have an infinite read loop in ReadUvarint and ReadVarint in encoding/binary via invalid inputs.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/ulikunitz/xz"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.5.8"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-16845"
}, {
"type" : "WEB",
"url" : "https://github.com/ulikunitz/xz/issues/35"
}, {
"type" : "WEB",
"url" : "https://github.com/ulikunitz/xz/commit/69c6093c7b2397b923acf82cb378f55ab2652b9b"
}, {
"type" : "WEB",
"url" : "https://groups.google.com/forum/#!topic/golang-announce/NyPIaucMgXo"
}, {
"type" : "WEB",
"url" : "https://groups.google.com/forum/#!topic/golang-announce/_ulYYcIWg3Q"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2020/11/msg00037.html"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2020/11/msg00038.html"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6RCFJTMKHY5ICGEM5BUFUEDDGSPJ25XU"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KWRBAH4UZJO3RROQ72SYCUPFCJFA22FO"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TACQFZDPA7AUR6TRZBCX2RGRFSDYLI7O"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/WV2VWKFTH4EJGZBZALVUJQJOAQB5MDQ4"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20200924-0002"
}, {
"type" : "WEB",
"url" : "https://www.debian.org/security/2021/dsa-4848"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpuApr2021.html"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-security-announce/2020-08/msg00021.html"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-security-announce/2020-08/msg00028.html"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-security-announce/2020-09/msg00029.html"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-security-announce/2020-09/msg00030.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-835" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-06-18T22:05:40Z",
"nvd_published_at" : "2020-08-06T18:15:00Z"
}
}