# CVE-2021-3602: GO-2022-0345 - Environment variable leakage in github.com/containers/buildah

Source: https://junglewise.ai/threats/cve-2021-3602-buildah-processes-using-chroot-isolation-may-leak-environment  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-07-15  
License: CC BY 4.0 with a link back

CVE-2021-3602 · Severity: low · CVSS 3.1 · Published 2022-07-15

Environment variable leakage in github.com/containers/buildah

Technologies: [github.com/containers/buildah (Go)](https://junglewise.ai/threats/technologies/github-com-containers-buildah). Vendors: [Go](https://junglewise.ai/threats/vendors/go).

## Quick answers

**Is CVE-2021-3602 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-3602 being exploited in the wild.

**How severe is CVE-2021-3602?** Low severity, with a CVSS score of 3.1, published 15 July 2022.

**Which products and versions are affected?** github.com/containers/buildah (Go) SEMVER:introduced=0,fixed=1.16.8, SEMVER:introduced=0,fixed=1.22.0.

**Is there a fix for CVE-2021-3602?** Yes. github.com/containers/buildah (Go): upgrade to 1.16.8, 1.22.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2021-3602?** Check whether you run github.com/containers/buildah (Go) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- github.com/containers/buildah (Go): upgrade to 1.16.8, 1.22.0 or later

  ```sh
  go get github.com/containers/buildah@v1.22.0
  ```


## Affected products

- github.com/containers/buildah (Go) SEMVER:introduced=0,fixed=1.16.8, SEMVER:introduced=0,fixed=1.22.0

## Identifiers

- CVE-2021-3602
- GHSA-7638-r9r3-rmjj
- GO-2022-0345

## Related threats

- [Containers Buildah path traversal in build context processing](https://junglewise.ai/threats/cve-2026-44517-containers-buildah-path-traversal-in-build-context-processing)
- [Buildah allows build breakout using malicious Containerfiles and concurrent builds](https://junglewise.ai/threats/cve-2024-11218-buildah-allows-build-breakout-using-malicious-containerfiles-and)
- [GO-2024-3169 - Improper Input Validation in Buildah and Podman in github.com/containers/buildah](https://junglewise.ai/threats/cve-2024-9407-improper-input-validation-in-buildah-and-podman)
- [containers Buildah path traversal in cache mounts](https://junglewise.ai/threats/cve-2024-9675-containers-buildah-path-traversal-in-cache-mounts)
- [GO-2022-0828 - Path Traversal in Buildah in github.com/containers/buildah](https://junglewise.ai/threats/cve-2020-10696-path-traversal-in-buildah)
