Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/containers/storage
  4. ›
  5. CVE-2021-20291

CVE-2021-20291: Improper Locking

May 10, 2021 (updated May 25, 2021)

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).

References

  • github.com/advisories/GHSA-7qw8-847f-pggm
  • github.com/containers/storage/commit/306fcabc964470e4b3b87a43a8f6b7d698209ee1
  • nvd.nist.gov/vuln/detail/CVE-2021-20291
  • unit42.paloaltonetworks.com/cve-2021-20291/

Code Behaviors & Features

Detect and mitigate CVE-2021-20291 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.28.1

Fixed versions

  • 1.28.1

Solution

Upgrade to version 1.28.1 or above.

Impact 6.5 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-667: Improper Locking

Source file

go/github.com/containers/storage/CVE-2021-20291.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:49 +0000.