CVE-2024-11218: Buildah Containerfile Vulnerability Leading to Build Breakout

Summary

21/01/2025
Yes i
High
8.6

CVE-2024-11218: Buildah allows build breakout using malicious Containerfiles and concurrent builds. Affects github.com/containers/buildah across 4 version ranges.

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

Fixed in 4 releases; the minimum fixed version depends on the release line you run. How to fix ↓

Also tracked for

The same CVE-2024-11218 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Buildah is an open-source tool that facilitates the building of container images. It is designed to create OCI and Docker container images without requiring a daemon. Buildah allows users to define container images using Containerfiles, which can include various instructions for building and configuring the image. However, a vulnerability has been identified that allows malicious Containerfiles to exploit concurrent builds, potentially exposing sensitive data from the host system.

Vulnerability Detail

The vulnerability arises from the misuse of the '--mount' flag in RUN instructions within Containerfiles. When combined with multi-stage builds or concurrent builds, a malicious Containerfile can expose the build host's content to the RUN instruction's command. This can lead to unauthorized access to sensitive files, including setuid executables, especially when the build process is executed with elevated privileges, such as a root-owned podman system service. The implications are severe, as it allows unprivileged users to read and write files they should not have access to.

How To Fix

Latest published version: v1.43.5 as of 22 Oct 2026

go get github.com/containers/buildah@v1.43.5

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 1.33.12 1.33.12
    go get github.com/containers/buildah@v1.33.12
  • >= 1.35.0, < 1.35.5 1.35.5
    go get github.com/containers/buildah@v1.35.5
  • >= 1.37.0, < 1.37.6 1.37.6
    go get github.com/containers/buildah@v1.37.6
  • >= 1.38.0, < 1.38.1 1.38.1
    go get github.com/containers/buildah@v1.38.1

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

Implement mandatory access controls to limit the access of the process performing the build. This can help mitigate the risk of unauthorized access to sensitive files during the build process.

Conclusion

CVE-2024-11218 presents a significant security risk for users of Buildah, particularly in environments where unprivileged users can execute builds. It is crucial to update to the patched versions and implement access controls to mitigate potential threats.

See every vulnerability recorded for github.com/containers/buildah →

Share this vulnerability

FAQ

CVE-2024-11218 is a vulnerability in Buildah that allows malicious Containerfiles to expose sensitive data from the build host during concurrent builds.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without needing to sign up.

The risks include unauthorized access to sensitive files, including setuid executables, which could be exploited by unprivileged users to gain elevated privileges.

Update Buildah to the latest patched version and implement mandatory access controls to limit the access of the build process.

More information about Buildah can be found on its official GitHub repository and documentation pages.

Related vulnerabilities

Recent vulnerabilities recorded for github.com/containers/buildah.

How To Fix

Latest published version: v1.43.5 as of 22 Oct 2026

go get github.com/containers/buildah@v1.43.5

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 1.33.12 1.33.12
    go get github.com/containers/buildah@v1.33.12
  • >= 1.35.0, < 1.35.5 1.35.5
    go get github.com/containers/buildah@v1.35.5
  • >= 1.37.0, < 1.37.6 1.37.6
    go get github.com/containers/buildah@v1.37.6
  • >= 1.38.0, < 1.38.1 1.38.1
    go get github.com/containers/buildah@v1.38.1

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback