Skip to content

Buildah allows build breakout using malicious Containerfiles and concurrent builds

High severity GitHub Reviewed Published Jan 20, 2025 in containers/buildah • Updated Jan 22, 2025

Package

gomod github.com/containers/buildah (Go)

Affected versions

>= 1.38.0, < 1.38.1
>= 1.37.0, < 1.37.6
>= 1.35.0, < 1.35.5
< 1.33.12

Patched versions

1.38.1
1.37.6
1.35.5
1.33.12

Description

Impact

With careful use of the --mount flag in RUN instructions in Containerfiles, and by using either multi-stage builds with use of concurrently-executing build stages (e.g., using the --jobs CLI flag) or multiple separate but concurrently-executing builds, a malicious Containerfile can be used to expose content from the build host to the command being run using the RUN instruction. This can be used to read or write contents using the privileges of the process which is performing the build. When that process is a root-owned podman system service which is provided for use by unprivileged users, this includes the ability to read and write contents which the client should not be allowed to read and write, including setuid executables in locations where they can be later accessed by unprivileged users.

Patches

Patches have been merged to the main branch, and will be added to upcoming releases on the release-1.38, release-1.37, release-1.35, and release-1.33 branches.

This addressed a number of Jira cards, but primarily https://issues.redhat.com/browse/RHEL-67616 and https://issues.redhat.com/browse/RHEL-67618, which were then vendored into Podman and backported into olde rbranches.

Workarounds

Mandatory access controls should limit the access of the process performing the build, on systems where they are enabled.

References

@nalind nalind published to containers/buildah Jan 20, 2025
Published to the GitHub Advisory Database Jan 21, 2025
Reviewed Jan 21, 2025
Published by the National Vulnerability Database Jan 22, 2025
Last updated Jan 22, 2025

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

EPSS score

0.053%
(24th percentile)

Weaknesses

CVE ID

CVE-2024-11218

GHSA ID

GHSA-5vpc-35f4-r8w6

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.