CVE-2021-3602 json
Buildah processes using chroot isolation may leak environment values to intermediate processes
published 5y ago modified last mo. also GHSA-7638-r9r3-rmjj , GO-2022-0345 , EUVD-2021-1446
- cvss
- 5.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 25%
- public exploits
- 0
- none known
Summary
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).
Patch / fix
- go github.com/containers/buildah 1.16.8, 1.17.2, 1.19.9, 1.21.3, 1.22.0
- buildah_project buildah 1.16.8, 1.17.2, 1.19.9, 1.21.3
- golang-github-containers-buildah Debian 14, Debian 13, Debian 12 1.22.3+ds1-1
debian advisories DEBIAN-CVE-2021-3602
- crit RHEL 8 3.15-3.module+el8.5.0+12582+56d94c81
- criu RHEL 8 3.15-3.module+el8.5.0+12582+56d94c81
- crun RHEL 8 1.0-1.module+el8.5.0+12582+56d94c81
- runc RHEL 8 1.0.2-1.module+el8.5.0+12582+56d94c81
- udica RHEL 8 0.2.5-2.module+el8.5.0+12582+56d94c81
- conmon RHEL 8 2:2.0.29-1.module+el8.5.0+12582+56d94c81
- podman RHEL 8 3.3.1-9.module+el8.5.0+12697+018f24d7
- skopeo RHEL 8 1:1.4.2-0.1.module+el8.5.0+12582+56d94c81
red hat advisories RHSA-2021:4154RHSA-2021:4222RHSA-2021:4221
- libcontainers-common SLES for SAP 15 SP2, SLES for SAP 15 SP1, SLES 15 SP2-LTSS +12 more 20210626-150100.3.15.1
- podman SLE Module for Containers 15 SP3, SLE Micro 5.1 3.4.4-150300.9.3.2
- conmon SLE Module for Containers 15 SP3, SLE Micro 5.1 2.0.30-150300.8.3.1
- libseccomp SLE Module for Basesystem 15 SP3, SLE Micro 5.1 2.5.3-150300.10.5.1
- libcontainers-common SLE Module for Basesystem 15 SP3, SLE Micro 5.1 20210626-150300.8.3.1
suse advisories SUSE-SU-2022:3312-1SUSE-SU-2022:23018-1
- libcontainers-common openSUSE Tumbleweed 20210626-7.1
- podman openSUSE Leap 15.3 3.4.4-150300.9.3.2
- conmon openSUSE Leap 15.3 2.0.30-150300.8.3.1
- libseccomp openSUSE Leap 15.3 2.5.3-150300.10.5.1
- libcontainers-common openSUSE Leap 15.3 20210626-150300.8.3.1
opensuse advisories openSUSE-SU-2024:11757-1openSUSE-SU-2022:23018-1
- crit AlmaLinux 8 3.15-1.module_el8.5.0+2614+87221ce8
- crit AlmaLinux 8 3.15-1.module_el8.6.0+2876+9ed4eae2
- criu AlmaLinux 8 3.15-1.module_el8.6.0+2876+9ed4eae2
- criu AlmaLinux 8 3.15-1.module_el8.5.0+2614+87221ce8
- crun AlmaLinux 8 0.18-2.module_el8.5.0+2614+87221ce8
- runc AlmaLinux 8 1.0.0-72.rc92.module_el8.5.0+2614+87221ce8
- udica AlmaLinux 8 0.2.4-1.module_el8.6.0+2876+9ed4eae2
- udica AlmaLinux 8 0.2.4-1.module_el8.5.0+2614+87221ce8
almalinux advisories ALSA-2021:4222ALSA-2021:4221ALSA-2021:4154
- criu Rocky Linux 8 3.15-1.module+el8.7.0+1076+9b1c11c1
- criu Rocky Linux 8 3.15-1.module+el8.4.0+556+40122d08
- criu Rocky Linux 8 3.15-1.module+el8.5.0+709+440d5e7e
- criu Rocky Linux 8 3.15-1.module+el8.6.0+783+10209741
- crun Rocky Linux 8 0.18-2.module+el8.4.0+556+40122d08
- crun Rocky Linux 8 0.18-2.module+el8.5.0+709+440d5e7e
- runc Rocky Linux 8 1.0.0-72.rc92.module+el8.5.0+661+c0df01f6
- runc Rocky Linux 8 1.0.0-72.rc92.module+el8.5.0+709+440d5e7e
rocky linux advisories RLSA-2021:4222RLSA-2021:4221RLSA-2021:4154
- podman Alpine 3.24, Alpine 3.23, Alpine 3.22 +8 more 3.2.3-r0
- buildah Alpine 3.24, Alpine 3.23, Alpine 3.22 +8 more 1.21.3-r0
alpine advisories ALPINE-CVE-2021-3602
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- cri-o CBL-Mariner 2.0 1.21.7-2
- buildah Azure Linux 3.0 1.41.4-2
azure linux advisories AZL-39837AZL-44154
Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT
Is CVE-2021-3602 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-3602 updated cvss 5.6
buildah: Host environment variables leaked in build container when using chroot isolation
-
Red Hat Enterprise Linux 7 podman, buildahaffected: no fix planned “Out of support scope”
-
Red Hat OpenShift Container Platform 3.11 podman Red Hat OpenShift Container Platform 4 podman, buildah, podman-tests, buildah-tests, podman-docker, podman-remote, +4 more Red Hat Quay 3 quay/quay-builder-rhel8affected: no fix planned “Will not fix”
-
Red Hat Enterprise Linux AppStream (v. 8) crun 1.0-1.module+el8.5.0+12582+56d94c81, crit 3.12-9.module+el8.5.0+10223+f7559c42, crit 3.15-1.module+el8.5.0+10306+3f72d66d, crit 3.15-3.module+el8.5.0+12582+56d94c81, criu 3.12-9.module+el8.5.0+10223+f7559c42, criu 3.15-1.module+el8.5.0+10306+3f72d66d, +74 morefixed: vendor fix RHSA-2021:4221
-
Red Hat Enterprise Linux 9 podman, buildah, podman-tests, buildah-tests, podman-docker, podman-remote, +3 more Red Hat OpenShift Container Platform 4 cri-o, openshift4/ose-docker-buildernot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
0.32% chance of exploitation in the next 30 days, higher than 25% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
| NVD | 2.0 | 1.9 | AV:L/AC:M/Au:N/C:P/I:N/A:N |
| GitHub | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | github.com/containers/buildah | <1.16.8 >=1.17.0, <1.17.2 >=1.18.0, <1.19.9 >=1.20.0, <1.21.3 <1.22.0 |
1.16.8 1.17.2 1.19.9 1.21.3 1.22.0 |
Affected products
- n/a buildah
Classification
References
-
github.com
/containers/buildah/commit/a468ce0ffd347035d53ee0e26c205ef604097fb0
web, patch, third-party-advisory
-
bugzilla.redhat.com
/show_bug.cgi?id=1969264
web, issue-tracking, patch, third-party-advisory
-
ubuntu.com
/security/CVE-2021-3602
web, patch, third-party-advisory
-
github.com
/containers/buildah/security/advisories/GHSA-7638-r9r3-rmjj
web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-3602
advisory
-
github.com
/containers/buildah
package
-
pkg.go.dev
/vuln/GO-2022-0345
web
Sources
- CVE List CVE-2021-3602
- GitHub Advisory GHSA-7638-r9r3-rmjj
- NVD CVE-2021-3602
- OSV GO-2022-0345
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.