# CVE-2021-20291: Improper Locking in github.com/containers/storage

- Severity: Medium 6.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.59%, higher than 76% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-04-01T17:49:40.000Z
- Modified: 2026-06-17T03:33:37.010Z
- Also known as: GHSA-7qw8-847f-pggm, GO-2021-0100
- Weaknesses: CWE-400, CWE-667
- Assigned by: redhat

## Description

A deadlock vulnerability was found in 'github.com/containers/storage' in versions before 1.28.1. When a container image is processed, each layer is unpacked using `tar`. If one of those layers is not a valid `tar` archive this causes an error leading to an unexpected situation where the code indefinitely waits for the tar unpacked stream, which never finishes. An attacker could use this vulnerability to craft a malicious image, which when downloaded and stored by an application using containers/storage, would then cause a deadlock leading to a Denial of Service (DoS).

(As written by CVE List.)

## Affected

- containers/storage: containers/storage 1.28.1
- github.com/containers/storage (Go): before 1.28.1
- storage_project storage: before 1.28.1
- redhat openshift_container_platform: 4.0
- redhat enterprise_linux: 8.0
- fedoraproject fedora: 33; 34

## Every score

- GitHub: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`
- NVD: CVSS:2.0 7.1 High `AV:N/AC:M/Au:N/C:N/I:N/A:C`

## References

- <https://unit42.paloaltonetworks.com/cve-2021-20291/> (exploit, third-party-advisory)
- <https://bugzilla.redhat.com/show_bug.cgi?id=1939485> (issue-tracking, patch, third-party-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/R5D7XL7FL24TWFMGQ3K2S72EOUSLZMKL/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZNMB7O2UIXE34PGSCSOULGHPX5LIJBMM/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WX24EITRXVHDM5M223BVTJA2ODF2FSHI/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SPYOHNG2Q7DCAQZMGYLMENLKALGDLG3X/> (vendor-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-20291> (advisory)
- <https://github.com/containers/storage/pull/860> (fix, web)
- <https://github.com/containers/storage/commit/306fcabc964470e4b3b87a43a8f6b7d698209ee1> (fix, web)
- <https://github.com/containers/storage> (package)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/R5D7XL7FL24TWFMGQ3K2S72EOUSLZMKL> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SPYOHNG2Q7DCAQZMGYLMENLKALGDLG3X> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/WX24EITRXVHDM5M223BVTJA2ODF2FSHI> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZNMB7O2UIXE34PGSCSOULGHPX5LIJBMM> (web)
- <https://pkg.go.dev/vuln/GO-2021-0100> (web)
- <https://unit42.paloaltonetworks.com/cve-2021-20291> (web)

## Sources

- CVE List: [CVE-2021-20291](https://www.cve.org/CVERecord?id=CVE-2021-20291), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-7qw8-847f-pggm](https://github.com/advisories/GHSA-7qw8-847f-pggm), CC-BY-4.0, modified 2023-11-08
- Go Vulnerability Database: [GO-2021-0100](https://pkg.go.dev/vuln/GO-2021-0100), CC-BY-4.0, modified 2024-05-20
- NVD: [CVE-2021-20291](https://nvd.nist.gov/vuln/detail/CVE-2021-20291), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-20291 · Whole record: https://cve.day/CVE-2021-20291.json · Rebuilt by cve.day 2026-11-25T22:58:00.549Z
