Information Disclosure Vulnerability in Buildah: Access to Sensitive Environment Variables

Summary

03/03/2022
N/A
No i
Medium
5.5

CVE-2021-3602: An information disclosure flaw was found in Buildah, when building containers using chroot isolation. Affects golang-github-containers-buildah versions < a468ce0ffd347035d53ee0e26c205ef604097fb0. 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 Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Buildah is a tool designed for building Open Container Initiative (OCI) and Docker container images. It allows users to create and manage container images without requiring a full container runtime. Buildah is particularly useful in CI/CD environments where automation and security are paramount. However, it has been found to have a vulnerability that can expose sensitive information during the container build process.

Vulnerability Detail

An information disclosure flaw exists in Buildah when building containers using chroot isolation. This vulnerability allows processes running in container builds, such as those executed by Dockerfile RUN commands, to access environment variables from parent and grandparent processes. In CI/CD environments, these environment variables may contain sensitive information, such as container registry credentials, which are intended to be used only by Buildah. The potential ramifications include unauthorized access to sensitive data, leading to security breaches and compromised systems.

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, avoid passing sensitive environment variables to the container during the build process. Instead, consider using build secrets or other secure methods to manage sensitive information.

Conclusion

The information disclosure vulnerability in Buildah poses a significant risk in environments where sensitive data is handled. It is crucial to update to the latest version of Buildah to mitigate this risk. Additionally, employing workarounds can help protect sensitive information until an update can be applied.

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

Share this vulnerability

FAQ

The CVSS score for this vulnerability is 5.5, indicating a moderate level of severity.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. By using the Vulert playground, you can check if your application is affected without requiring any installation.

The vulnerability can lead to unauthorized access to sensitive information, such as credentials, which may result in security breaches and compromised systems.

Yes, the vulnerability is fixed in Buildah version 1.22.3+ds1-1 and later.

If an immediate update is not possible, avoid passing sensitive environment variables during the build process as a temporary workaround.

Related vulnerabilities

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

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