CVE-2021-20291: Denial of Service via Deadlock in github.com/containers/storage
Summary
CVE-2021-20291: Denial of service via deadlock in github.com/containers/storage. Affects github.com/containers/storage versions < 1.28.1. Fixed in 1.28.1. How to fix ↓
Also tracked for
- golang-github-containers-storage · Debian:11
The same CVE-2021-20291 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The github.com/containers/storage package is a Go package that provides functionality for managing container storage. It includes various features such as archiving, copying, and decompressing container resources. This package is widely used in the Go ecosystem for container-related applications.
Vulnerability Detail
A goroutine deadlock exists in the github.com/containers/storage/pkg/archive.DecompressStream function when used on an xz archive. This results in a reader that hangs indefinitely when the Close method is called. An attacker can exploit this vulnerability by providing a malicious archive and causing the caller to attempt to decompress it. This can lead to a denial of service (DoS) condition, as the application will be stuck waiting for the reader to close.
How To Fix
Latest published version: v1.59.1 as of 22 Oct 2026
go get github.com/containers/storage@v1.59.1
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
1.28.1
This is the first release that contains the fix.
go get github.com/containers/storage@v1.28.1
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is recommended to update to the fixed version of the github.com/containers/storage package as soon as possible.
Conclusion
The github.com/containers/storage package is vulnerable to a denial of service (DoS) attack due to a goroutine deadlock issue. Developers should update their applications to use version 1.28.1 or later of the package to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for github.com/containers/storage →
FAQ
This vulnerability can lead to a denial of service (DoS) condition in applications that use the github.com/containers/storage package. An attacker can exploit the vulnerability by providing a malicious archive and causing the application to hang indefinitely when attempting to decompress it.
Versions 0.0.1 through 1.28.0 of the github.com/containers/storage package are affected by this vulnerability.
There are no known public exploits for this vulnerability at the time of this report.
Input validation alone cannot mitigate this vulnerability. The issue lies within the package itself and requires a fix in the code.
Yes, a public advisory has been released for this vulnerability. It can be found at the following URL: [link to advisory]