GHSA-7638-r9r3-rmjj

Suggest an improvement
Source
https://github.com/advisories/GHSA-7638-r9r3-rmjj
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/07/GHSA-7638-r9r3-rmjj/GHSA-7638-r9r3-rmjj.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-7638-r9r3-rmjj
Aliases
Related
Published
2021-07-19T15:19:09Z
Modified
2023-11-08T04:06:11.111741Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N CVSS Calculator
Summary
Buildah processes using chroot isolation may leak environment values to intermediate processes
Details

Impact

When running processes using "chroot" isolation, the process being run can examine the environment variables of its immediate parent and grandparent processes (CVE-2021-3602). This isolation type is often used when running buildah in unprivileged containers, and it is often used to do so in CI/CD environments. If sensitive information is exposed to the original buildah process through its environment, that information will unintentionally be shared with child processes which it starts as part of handling RUN instructions or during buildah run. The commands that buildah is instructed to run can read that information if they choose to.

Patches

Users should upgrade packages, or images which contain packages, to include version 1.21.3 or later.

Workarounds

As a workaround, invoking buildah in a container under env -i to have it started with a reinitialized environment should prevent the leakage.

For more information

If you have any questions or comments about this advisory: * Open an issue in buildah * Email us at the buildah general mailing list, or the podman security mailing list if it's sensitive.

References

Affected packages

Go / github.com/containers/buildah

Package

Name
github.com/containers/buildah
View open source insights on deps.dev
Purl
pkg:golang/github.com/containers/buildah

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.16.8

Database specific

{
    "last_known_affected_version_range": "<= 1.16.7"
}

Go / github.com/containers/buildah

Package

Name
github.com/containers/buildah
View open source insights on deps.dev
Purl
pkg:golang/github.com/containers/buildah

Affected ranges

Type
SEMVER
Events
Introduced
1.17.0
Fixed
1.17.2

Database specific

{
    "last_known_affected_version_range": "<= 1.17.1"
}

Go / github.com/containers/buildah

Package

Name
github.com/containers/buildah
View open source insights on deps.dev
Purl
pkg:golang/github.com/containers/buildah

Affected ranges

Type
SEMVER
Events
Introduced
1.18.0
Fixed
1.19.9

Database specific

{
    "last_known_affected_version_range": "<= 1.19.8"
}

Go / github.com/containers/buildah

Package

Name
github.com/containers/buildah
View open source insights on deps.dev
Purl
pkg:golang/github.com/containers/buildah

Affected ranges

Type
SEMVER
Events
Introduced
1.20.0
Fixed
1.21.3

Database specific

{
    "last_known_affected_version_range": "<= 1.21.2"
}