Deadlock Vulnerability in golang-github-containers-storage: Denial of Service Risk

Summary

01/04/2021
N/A
No i
Medium
6.5

CVE-2021-20291: A deadlock vulnerability was found in 'github.com/containers/storage' in versions before 1.28.1. Affects golang-github-containers-storage versions < 1377cdd4aa19150f967f54a727cc1d5ac8c2003f. No fix is published. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

The golang-github-containers-storage package is a library used for managing container storage in Go applications. It provides functionalities for handling container images and their layers, allowing developers to efficiently manage storage resources. However, this package is vulnerable to a deadlock issue when processing container images, particularly when invalid tar archives are encountered.

Vulnerability Detail

A deadlock vulnerability exists in the golang-github-containers-storage package in versions prior to 1.28.1. When processing a container image, each layer is unpacked using the tar utility. If any layer is not a valid tar archive, it triggers an error that leads to the code waiting indefinitely for the tar unpacked stream to finish. This situation can be exploited by an attacker who crafts a malicious image, leading to a Denial of Service (DoS) condition as the application becomes unresponsive.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, ensure that only trusted container images are processed. Implement validation checks for tar archives before unpacking them to prevent the application from entering a deadlock state.

Conclusion

The deadlock vulnerability in the golang-github-containers-storage package poses a significant risk of Denial of Service. It is crucial for developers to update to the latest version to mitigate this risk and ensure the reliability of their applications.

See every vulnerability recorded for golang-github-containers-storage →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 6.5, indicating a moderate level of risk.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.

If an immediate update is not possible, ensure that you only use trusted images and implement validation checks for tar archives.

Exploitation of this vulnerability can lead to a Denial of Service (DoS), causing the application to become unresponsive.

More information can be found in the CVE details and related advisories linked to CVE-2021-20291.

Related vulnerabilities

Recent vulnerabilities recorded for golang-github-containers-storage.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback