cve.bz

CVE-2021-3602

5.5 mediumEPSS 0.3%Fix available

Medium (5.5). EPSS 0.3% estimated probability of exploitation activity in the next 30 days. Fixed in github.com/containers/buildah 1.16.8, 1.17.2, 1.19.9.

On this page
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).

Severity

CVSS 3.1

5.5 medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
EPSS
0.3% (unchanged from 0.3% a week ago; 0.3% 30 days ago) estimated probability of exploitation activity in the next 30 days; 25th percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CWEs
CWE-212 Improper Removal of Sensitive Information Before Storage or Transfer
CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-3602 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-3602?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-3602?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-3602 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
buildah_project:buildahbefore 1.16.8
buildah_project:buildahfrom 1.17.0 before 1.17.2
buildah_project:buildahfrom 1.19.0 before 1.19.9
buildah_project:buildahfrom 1.21.0 before 1.21.3
redhat:enterprise_linux8.0
redhat:enterprise_linux_for_ibm_z_systems8.0
redhat:enterprise_linux_for_power_little_endian8.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-7638-r9r3-rmjjGogithub.com/containers/buildah<1.16.81.16.8
GHSA-7638-r9r3-rmjjGogithub.com/containers/buildah>=1.17.0 <1.17.21.17.2
GHSA-7638-r9r3-rmjjGogithub.com/containers/buildah>=1.18.0 <1.19.91.19.9
GHSA-7638-r9r3-rmjjGogithub.com/containers/buildah>=1.20.0 <1.21.31.21.3
GO-2022-0345Gogithub.com/containers/buildah<1.22.01.22.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14golang-github-containers-buildah1.22.3+ds1-1DEBIAN-CVE-2021-3602
Ubuntu22.04:LTS, 25.10, 26.10 and 2 moregolang-github-containers-buildahno fix listedUBUNTU-CVE-2021-3602
Red Hatenterprise_linux:8::appstreambuildah, buildah-tests, buildah-debuginfo and 2 more0:1.11.6-9.module+el8.5.0+12239+ec01067bRHSA-2021:4221
Red Hatenterprise_linux:8::appstreambuildah, buildah-tests, buildah-debuginfo and 2 more0:1.19.9-1.module+el8.5.0+12236+c988d830RHSA-2021:4222
Red Hatenterprise_linux:8::appstreambuildah, buildah-tests, buildah-debuginfo and 2 more0:1.22.3-2.module+el8.5.0+12582+56d94c81RHSA-2021:4154
Red Hatenterprise_linux:8::appstreamcockpit-podman0:11-1.module+el8.5.0+10223+f7559c42RHSA-2021:4221
Red Hatenterprise_linux:8::appstreamcockpit-podman0:29-2.module+el8.5.0+10306+3f72d66dRHSA-2021:4222
Red Hatenterprise_linux:8::appstreamcockpit-podman0:33-1.module+el8.5.0+12582+56d94c81RHSA-2021:4154
Red Hatenterprise_linux:8::appstreamconmon2:2.0.15-1.module+el8.5.0+10223+f7559c42RHSA-2021:4221
Red Hatenterprise_linux:8::appstreamconmon, conmon-debuginfo, conmon-debugsource2:2.0.26-1.module+el8.5.0+10306+3f72d66dRHSA-2021:4222
Red Hatenterprise_linux:8::appstreamconmon, conmon-debuginfo, conmon-debugsource2:2.0.29-1.module+el8.5.0+12582+56d94c81RHSA-2021:4154
Red Hatenterprise_linux:8::appstreamcontainer-selinux2:2.130.0-1.module+el8.5.0+10223+f7559c42RHSA-2021:4221
Red Hatenterprise_linux:8::appstreamcontainer-selinux2:2.167.0-1.module+el8.5.0+12582+56d94c81RHSA-2021:4154
Red Hatenterprise_linux:8::appstreamcontainer-selinux2:2.167.0-1.module+el8.5.0+12609+beaa716dRHSA-2021:4222
36 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 6, Enterprise Storage 7, Linux Enterprise High Performance Computing 15 SP1-ESPOS and 12 morelibcontainers-common20210626-150100.3.15.1SUSE-SU-2022:3312-1
SUSELinux Enterprise Micro 5.1, Linux Enterprise Module for Basesystem 15 SP3libcontainers-common20210626-150300.8.3.1SUSE-SU-2022:23018-1
SUSELinux Enterprise Micro 5.1, Linux Enterprise Module for Basesystem 15 SP3libseccomp2.5.3-150300.10.5.1SUSE-SU-2022:23018-1
SUSELinux Enterprise Micro 5.1, Linux Enterprise Module for Containers 15 SP3conmon2.0.30-150300.8.3.1SUSE-SU-2022:23018-1
SUSELinux Enterprise Micro 5.1, Linux Enterprise Module for Containers 15 SP3podman3.4.4-150300.9.3.2SUSE-SU-2022:23018-1
openSUSELeap 15.3conmon2.0.30-150300.8.3.1openSUSE-SU-2022:23018-1
openSUSELeap 15.3libcontainers-common20210626-150300.8.3.1openSUSE-SU-2022:23018-1
openSUSELeap 15.3libseccomp2.5.3-150300.10.5.1openSUSE-SU-2022:23018-1
openSUSELeap 15.3podman3.4.4-150300.9.3.2openSUSE-SU-2022:23018-1
openSUSETumbleweedlibcontainers-common20210626-7.1openSUSE-SU-2024:11757-1
AlmaLinux8buildah, buildah-tests1.19.9-1.module_el8.5.0+2614+87221ce8ALSA-2021:4222
AlmaLinux8cockpit-podman11-1.module_el8.5.0+108+00865455ALSA-2021:4221
AlmaLinux8cockpit-podman11-1.module_el8.5.0+2635+e4386a39ALSA-2021:4221
AlmaLinux8cockpit-podman29-2.module_el8.5.0+2614+87221ce8ALSA-2021:4222
AlmaLinux8cockpit-podman29-2.module_el8.6.0+2876+9ed4eae2ALSA-2021:4222
AlmaLinux8conmon2:2.0.15-1.module_el8.5.0+108+00865455ALSA-2021:4221
AlmaLinux8conmon2:2.0.15-1.module_el8.5.0+2635+e4386a39ALSA-2021:4221
AlmaLinux8conmon2:2.0.26-1.module_el8.5.0+2614+87221ce8ALSA-2021:4222
AlmaLinux8conmon2:2.0.26-1.module_el8.6.0+2876+9ed4eae2ALSA-2021:4222
AlmaLinux8container-selinux2:2.130.0-1.module_el8.5.0+108+00865455ALSA-2021:4221
AlmaLinux8container-selinux2:2.130.0-1.module_el8.5.0+2635+e4386a39ALSA-2021:4221
AlmaLinux8container-selinux2:2.167.0-1.module_el8.5.0+2614+87221ce8ALSA-2021:4222
45 more for AlmaLinux in the JSON.
Rocky Linux8buildah0:1.11.6-9.module+el8.5.0+708+6758137dRLSA-2021:4221
Rocky Linux8buildah0:1.19.9-1.module+el8.5.0+709+440d5e7eRLSA-2021:4222
Rocky Linux8buildah0:1.22.3-2.module+el8.5.0+710+4c471e88RLSA-2021:4154
Rocky Linux8cockpit-podman0:11-1.module+el8.4.0+559+c02fa3b2RLSA-2021:4221
Rocky Linux8cockpit-podman0:11-1.module+el8.5.0+708+6758137dRLSA-2021:4221
Rocky Linux8cockpit-podman0:11-1.module+el8.5.0+770+e2f49861RLSA-2021:4221
Rocky Linux8cockpit-podman0:29-2.module+el8.4.0+556+40122d08RLSA-2021:4222
Rocky Linux8cockpit-podman0:29-2.module+el8.5.0+709+440d5e7eRLSA-2021:4222
Rocky Linux8cockpit-podman0:29-2.module+el8.6.0+783+10209741RLSA-2021:4222
Rocky Linux8cockpit-podman0:29-2.module+el8.7.0+1076+9b1c11c1RLSA-2021:4222
Rocky Linux8cockpit-podman0:33-1.module+el8.5.0+710+4c471e88RLSA-2021:4154
Rocky Linux8conmon2:2.0.15-1.module+el8.4.0+559+c02fa3b2RLSA-2021:4221
94 more for Rocky Linux in the JSON.
Alpinev3.14, v3.15, v3.16 and 8 morebuildah1.21.3-r0ALPINE-CVE-2021-3602
Alpinev3.14, v3.15, v3.16 and 8 morepodman3.2.3-r0ALPINE-CVE-2021-3602
Azure Linux2cri-o1.21.7-2AZL-39837
Azure Linux3buildah1.41.4-2AZL-44154

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

OpenShift Container Platform 4's builder container is not vulnerable to this flaw as it uses OCI isolation (i.e. using runc) and does not use chroot isolation.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8container-tools:rhel8-8050020210921082437.faa19cc5Fixed 2021-11-09RHSA-2021:4154
Red Hat Enterprise Linux 8container-tools:2.0-8050020210817115648.faa19cc5Fixed 2021-11-09RHSA-2021:4221
Red Hat Enterprise Linux 8container-tools:3.0-8050020210915114620.faa19cc5Fixed 2021-11-09RHSA-2021:4222
Red Hat Enterprise Linux 7buildahOut of support scope
Red Hat Enterprise Linux 7podmanOut of support scope
Red Hat Enterprise Linux 9buildahNot affected
Red Hat Enterprise Linux 9podmanNot affected
Red Hat OpenShift Container Platform 3.11podmanWill not fix
Red Hat OpenShift Container Platform 4buildahWill not fix
Red Hat OpenShift Container Platform 4cri-oNot affected
Red Hat OpenShift Container Platform 4openshift4/ose-docker-builderNot affected
Red Hat OpenShift Container Platform 4podmanWill not fix
Red Hat Quay 3quay/quay-builder-rhel8Will not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-3602.

Attack patterns (CAPEC)

  • CAPEC-168 Windows ::DATA Alternate Data Stream Severity: Medium

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-200 (59).

References

Check your stackJSON