{"answers":{"affected":"9 open source packages ship an affected version, including github.com/containers/buildah. It affects 4 products.","exploited":"There is no known exploitation of CVE-2021-3602 in the wild and no public exploit code.","fix":"Upgrade github.com/containers/buildah to a fixed version for your release line: 1.16.8, 1.22.0, 1.17.2 or 1.19.9.","what":"CVE-2021-3602 is a medium-severity vulnerability in Redhat Enterprise Linux, published on 3 Mar 2022. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-3602 and fix it if it is affected.\n\nWhat it is: CVE-2021-3602 is a medium-severity vulnerability in Redhat Enterprise Linux, published on 3 Mar 2022. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-3602 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/containers/buildah (Go): affected all versions; fixed in 1.16.8\n- github.com/containers/buildah (Go): affected all versions; fixed in 1.16.8\n- github.com/containers/buildah (Go): affected all versions; fixed in 1.22.0\n- github.com/containers/buildah (Go): affected from 1.17.0; fixed in 1.17.2\n- github.com/containers/buildah (Go): affected from 1.17.0; fixed in 1.17.2\n- github.com/containers/buildah (Go): affected from 1.18.0; fixed in 1.19.9\n- github.com/containers/buildah (Go): affected from 1.18.0; fixed in 1.19.9\n- github.com/containers/buildah (Go): affected from 1.20.0; fixed in 1.21.3\n- github.com/containers/buildah (Go): affected from 1.20.0; fixed in 1.21.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-3602/ (Markdown: https://insights.sbomify.com/CVE-2021-3602/index.md)","id":"CVE-2021-3602","markdown":"https://insights.sbomify.com/CVE-2021-3602/index.md","name":"CVE-2021-3602","record":{"aliases":["ALSA-2021:4221","ALSA-2021:4222","AZL-39837","AZL-44154","CLEANSTART-2024-UF47484","DEBIAN-CVE-2021-3602","GHSA-7638-r9r3-rmjj","GO-2022-0345","RHSA-2021:4221","RHSA-2021:4222","RLSA-2021:4221","RLSA-2021:4222","UBUNTU-CVE-2021-3602"],"analysis":{"component_type":"container_or_infrastructure","fix_type":"patch","impacts":["data_read"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Buildah container tool","requires_auth":"low_privilege","summary":"Attackers can read sensitive environment variables from parent processes during container builds, potentially exposing credentials in CI/CD environments.","user_interaction":"not_required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"redhat","cpe":[{"product":"buildah","vendor":"buildah_project"},{"product":"enterprise_linux","vendor":"redhat"},{"product":"enterprise_linux_for_ibm_z_systems","vendor":"redhat"},{"product":"enterprise_linux_for_power_little_endian","vendor":"redhat"}],"cvss":{"score":5.5,"severity":"medium","source":"nvd","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-212","name":"Improper Removal of Sensitive Information Before Storage or Transfer"},{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"}],"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).","ecosystems":["AlmaLinux:8","Go","Red Hat:enterprise_linux:8::appstream","Rocky Linux:8"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Buildah processes using chroot isolation may leak environment values to intermediate processes","id":"CVE-2021-3602","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":"redhat:enterprise_linux","products":["redhat:enterprise_linux","redhat:enterprise_linux_for_ibm_z_systems","redhat:enterprise_linux_for_power_little_endian"],"type":"information_disclosure","year":"2021"},"n_packages":254,"n_references":4,"next":{"headline":"Inclusion of Functionality from Untrusted Control Sphere in PHPMailer/PHPMailer","id":"CVE-2021-3603"},"packages":[{"ecosystem":"Go","fixed":["1.16.8"],"introduced":["0"],"last_affected":[],"package":"github.com/containers/buildah","purl":null,"source":"GHSA-7638-r9r3-rmjj"},{"ecosystem":"Go","fixed":["1.16.8"],"introduced":["0"],"last_affected":[],"package":"github.com/containers/buildah","purl":"pkg:golang/github.com/containers/buildah","source":"GHSA-7638-r9r3-rmjj"},{"ecosystem":"Go","fixed":["1.22.0"],"introduced":["0"],"last_affected":[],"package":"github.com/containers/buildah","purl":"pkg:golang/github.com/containers/buildah","source":"GO-2022-0345"},{"ecosystem":"Go","fixed":["1.17.2"],"introduced":["1.17.0"],"last_affected":[],"package":"github.com/containers/buildah","purl":null,"source":"GHSA-7638-r9r3-rmjj"},{"ecosystem":"Go","fixed":["1.17.2"],"introduced":["1.17.0"],"last_affected":[],"package":"github.com/containers/buildah","purl":"pkg:golang/github.com/containers/buildah","source":"GHSA-7638-r9r3-rmjj"},{"ecosystem":"Go","fixed":["1.19.9"],"introduced":["1.18.0"],"last_affected":[],"package":"github.com/containers/buildah","purl":null,"source":"GHSA-7638-r9r3-rmjj"},{"ecosystem":"Go","fixed":["1.19.9"],"introduced":["1.18.0"],"last_affected":[],"package":"github.com/containers/buildah","purl":"pkg:golang/github.com/containers/buildah","source":"GHSA-7638-r9r3-rmjj"},{"ecosystem":"Go","fixed":["1.21.3"],"introduced":["1.20.0"],"last_affected":[],"package":"github.com/containers/buildah","purl":null,"source":"GHSA-7638-r9r3-rmjj"},{"ecosystem":"Go","fixed":["1.21.3"],"introduced":["1.20.0"],"last_affected":[],"package":"github.com/containers/buildah","purl":"pkg:golang/github.com/containers/buildah","source":"GHSA-7638-r9r3-rmjj"},{"ecosystem":"AlmaLinux:8","fixed":["1.19.9-1.module_el8.5.0+2614+87221ce8"],"introduced":["0"],"last_affected":[],"package":"buildah","purl":"pkg:rpm/almalinux/buildah","source":"ALSA-2021:4222"},{"ecosystem":"AlmaLinux:8","fixed":["1.19.9-1.module_el8.5.0+2614+87221ce8"],"introduced":["0"],"last_affected":[],"package":"buildah-tests","purl":"pkg:rpm/almalinux/buildah-tests","source":"ALSA-2021:4222"},{"ecosystem":"AlmaLinux:8","fixed":["11-1.module_el8.5.0+108+00865455"],"introduced":["0"],"last_affected":[],"package":"cockpit-podman","purl":"pkg:rpm/almalinux/cockpit-podman","source":"ALSA-2021:4221"},{"ecosystem":"AlmaLinux:8","fixed":["11-1.module_el8.5.0+2635+e4386a39"],"introduced":["0"],"last_affected":[],"package":"cockpit-podman","purl":"pkg:rpm/almalinux/cockpit-podman","source":"ALSA-2021:4221"},{"ecosystem":"AlmaLinux:8","fixed":["29-2.module_el8.5.0+2614+87221ce8"],"introduced":["0"],"last_affected":[],"package":"cockpit-podman","purl":"pkg:rpm/almalinux/cockpit-podman","source":"ALSA-2021:4222"},{"ecosystem":"AlmaLinux:8","fixed":["29-2.module_el8.6.0+2876+9ed4eae2"],"introduced":["0"],"last_affected":[],"package":"cockpit-podman","purl":"pkg:rpm/almalinux/cockpit-podman","source":"ALSA-2021:4222"},{"ecosystem":"AlmaLinux:8","fixed":["2:2.0.15-1.module_el8.5.0+108+00865455"],"introduced":["0"],"last_affected":[],"package":"conmon","purl":"pkg:rpm/almalinux/conmon","source":"ALSA-2021:4221"},{"ecosystem":"AlmaLinux:8","fixed":["2:2.0.15-1.module_el8.5.0+2635+e4386a39"],"introduced":["0"],"last_affected":[],"package":"conmon","purl":"pkg:rpm/almalinux/conmon","source":"ALSA-2021:4221"},{"ecosystem":"AlmaLinux:8","fixed":["2:2.0.26-1.module_el8.5.0+2614+87221ce8"],"introduced":["0"],"last_affected":[],"package":"conmon","purl":"pkg:rpm/almalinux/conmon","source":"ALSA-2021:4222"},{"ecosystem":"AlmaLinux:8","fixed":["2:2.0.26-1.module_el8.6.0+2876+9ed4eae2"],"introduced":["0"],"last_affected":[],"package":"conmon","purl":"pkg:rpm/almalinux/conmon","source":"ALSA-2021:4222"},{"ecosystem":"AlmaLinux:8","fixed":["2:2.130.0-1.module_el8.5.0+108+00865455"],"introduced":["0"],"last_affected":[],"package":"container-selinux","purl":"pkg:rpm/almalinux/container-selinux","source":"ALSA-2021:4221"},{"ecosystem":"AlmaLinux:8","fixed":["2:2.130.0-1.module_el8.5.0+2635+e4386a39"],"introduced":["0"],"last_affected":[],"package":"container-selinux","purl":"pkg:rpm/almalinux/container-selinux","source":"ALSA-2021:4221"},{"ecosystem":"AlmaLinux:8","fixed":["2:2.167.0-1.module_el8.5.0+2614+87221ce8"],"introduced":["0"],"last_affected":[],"package":"container-selinux","purl":"pkg:rpm/almalinux/container-selinux","source":"ALSA-2021:4222"},{"ecosystem":"AlmaLinux:8","fixed":["0.8.3-4.module_el8.5.0+108+00865455"],"introduced":["0"],"last_affected":[],"package":"containernetworking-plugins","purl":"pkg:rpm/almalinux/containernetworking-plugins","source":"ALSA-2021:4221"},{"ecosystem":"AlmaLinux:8","fixed":["0.8.3-4.module_el8.5.0+2635+e4386a39"],"introduced":["0"],"last_affected":[],"package":"containernetworking-plugins","purl":"pkg:rpm/almalinux/containernetworking-plugins","source":"ALSA-2021:4221"},{"ecosystem":"AlmaLinux:8","fixed":["0.9.1-1.module_el8.5.0+2614+87221ce8"],"introduced":["0"],"last_affected":[],"package":"containernetworking-plugins","purl":"pkg:rpm/almalinux/containernetworking-plugins","source":"ALSA-2021:4222"},{"ecosystem":"AlmaLinux:8","fixed":["0.9.1-1.module_el8.6.0+2876+9ed4eae2"],"introduced":["0"],"last_affected":[],"package":"containernetworking-plugins","purl":"pkg:rpm/almalinux/containernetworking-plugins","source":"ALSA-2021:4222"},{"ecosystem":"AlmaLinux:8","fixed":["1:0.1.41-4.module_el8.5.0+108+00865455"],"introduced":["0"],"last_affected":[],"package":"containers-common","purl":"pkg:rpm/almalinux/containers-common","source":"ALSA-2021:4221"},{"ecosystem":"AlmaLinux:8","fixed":["1:0.1.41-4.module_el8.5.0+2635+e4386a39"],"introduced":["0"],"last_affected":[],"package":"containers-common","purl":"pkg:rpm/almalinux/containers-common","source":"ALSA-2021:4221"},{"ecosystem":"AlmaLinux:8","fixed":["3.12-9.module_el8.3.0+2044+12421f43"],"introduced":["0"],"last_affected":[],"package":"crit","purl":"pkg:rpm/almalinux/crit","source":"ALSA-2021:4221"},{"ecosystem":"AlmaLinux:8","fixed":["3.12-9.module_el8.4.0+2496+12421f43"],"introduced":["0"],"last_affected":[],"package":"crit","purl":"pkg:rpm/almalinux/crit","source":"ALSA-2021:4221"},{"ecosystem":"AlmaLinux:8","fixed":["3.12-9.module_el8.5.0+119+9a9ec082"],"introduced":["0"],"last_affected":[],"package":"crit","purl":"pkg:rpm/almalinux/crit","source":"ALSA-2021:4221"},{"ecosystem":"AlmaLinux:8","fixed":["3.15-1.module_el8.5.0+2614+87221ce8"],"introduced":["0"],"last_affected":[],"package":"crit","purl":"pkg:rpm/almalinux/crit","source":"ALSA-2021:4222"},{"ecosystem":"AlmaLinux:8","fixed":["3.15-1.module_el8.6.0+2876+9ed4eae2"],"introduced":["0"],"last_affected":[],"package":"crit","purl":"pkg:rpm/almalinux/crit","source":"ALSA-2021:4222"},{"ecosystem":"AlmaLinux:8","fixed":["3.12-9.module_el8.3.0+2044+12421f43"],"introduced":["0"],"last_affected":[],"package":"criu","purl":"pkg:rpm/almalinux/criu","source":"ALSA-2021:4221"},{"ecosystem":"AlmaLinux:8","fixed":["3.12-9.module_el8.4.0+2496+12421f43"],"introduced":["0"],"last_affected":[],"package":"criu","purl":"pkg:rpm/almalinux/criu","source":"ALSA-2021:4221"},{"ecosystem":"AlmaLinux:8","fixed":["3.12-9.module_el8.5.0+119+9a9ec082"],"introduced":["0"],"last_affected":[],"package":"criu","purl":"pkg:rpm/almalinux/criu","source":"ALSA-2021:4221"},{"ecosystem":"AlmaLinux:8","fixed":["3.15-1.module_el8.5.0+2614+87221ce8"],"introduced":["0"],"last_affected":[],"package":"criu","purl":"pkg:rpm/almalinux/criu","source":"ALSA-2021:4222"},{"ecosystem":"AlmaLinux:8","fixed":["3.15-1.module_el8.6.0+2876+9ed4eae2"],"introduced":["0"],"last_affected":[],"package":"criu","purl":"pkg:rpm/almalinux/criu","source":"ALSA-2021:4222"},{"ecosystem":"AlmaLinux:8","fixed":["0.18-2.module_el8.5.0+2614+87221ce8"],"introduced":["0"],"last_affected":[],"package":"crun","purl":"pkg:rpm/almalinux/crun","source":"ALSA-2021:4222"},{"ecosystem":"AlmaLinux:8","fixed":["0.7.8-1.module_el8.5.0+108+00865455"],"introduced":["0"],"last_affected":[],"package":"fuse-overlayfs","purl":"pkg:rpm/almalinux/fuse-overlayfs","source":"ALSA-2021:4221"}],"prev":{"headline":"DO NOT USE THIS CANDIDATE NUMBER.","id":"CVE-2021-3601"},"products":["buildah"],"published":"2022-03-03","related":[{"cvss_score":8.8,"headline":"Path Traversal in Buildah","id":"CVE-2020-10696","kev_date_added":null,"published":"2020-03-31"},{"cvss_score":7.8,"headline":"Buildah: buildah allows arbitrary directory mount","id":"CVE-2024-9675","kev_date_added":null,"published":"2024-10-09"},{"cvss_score":7.1,"headline":"Buildah's incorrect handling of the supplementary groups may lead to data disclosure, modification","id":"CVE-2022-2990","kev_date_added":null,"published":"2022-09-13"},{"cvss_score":6.8,"headline":"Non-empty default inheritable capabilities for linux container in Buildah","id":"CVE-2022-27651","kev_date_added":null,"published":"2022-04-04"},{"cvss_score":6.4,"headline":"containers/image library Insufficiently Protects Credentials","id":"CVE-2019-10214","kev_date_added":null,"published":"2019-11-25"}],"sources":[{"class":"attribution","licence":"MIT","name":"AlmaLinux","prefix":"ALSA"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["n/a"]},"summary":"Attackers can read sensitive environment variables from parent processes during container builds, potentially exposing credentials in CI/CD environments.","url":"https://insights.sbomify.com/CVE-2021-3602/"}