CVE-2024-11218: Github.com/containers/buildah Buildah Allows Build Breakout Using Vulnerability

HIGH
Advisory Identifier: GHSA-5vpc-35f4-r8w6
CVSS 8.6
CWE-269
Published
Advisory Summary

CVE-2024-11218 is a HIGH (CVSS 8.6) buildah allows build breakout using vulnerability (CWE-269: Improper Privilege Management) affecting Github.com/containers/buildah libraries in the Go ecosystem. The issue involves buildah allows build breakout using malicious containerfiles and concurrent builds. Remediation is available by upgrading affected packages to version 1.38.1, 1.37.6, 1.35.5, 1.33.12.

CVE-2024-11218 at a Glance

CVE Identifier CVE-2024-11218
GHSA Identifier GHSA-5vpc-35f4-r8w6
Severity HIGH
CVSS v3.1 Base Score 8.6
CWE Classification CWE-269: Improper Privilege Management
Affected Product Github.com/containers/buildah
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.6

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2024-11218

To remediate this vulnerability, upgrade all affected Github.com/containers/buildah dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/containers/buildah fixed: 1.38.1
Upgrade github.com/containers/buildah to 1.38.1
github.com/containers/buildah fixed: 1.37.6
Upgrade github.com/containers/buildah to 1.37.6
github.com/containers/buildah fixed: 1.35.5
Upgrade github.com/containers/buildah to 1.35.5
github.com/containers/buildah fixed: 1.33.12
Upgrade github.com/containers/buildah to 1.33.12
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/containers/buildah

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-11218, inspect your project dependencies for Github.com/containers/buildah:

inspect dependencies for github.com/containers/buildah

Analyze the terminal output to locate any version of Github.com/containers/buildah in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.38.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. In Github.com/containers/buildah, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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.

CVE-2024-11218 Affected Github.com/containers/buildah Versions

4 component(s)
Fixed Versions:
1.38.11.37.61.35.51.33.12
Product / Package Ecosystem Affected Versions Fixed Version
github.com/containers/buildah
Go
≥ 1.38.0
< 1.38.1
1.38.1
github.com/containers/buildah
Go
≥ 1.37.0
< 1.37.6
1.37.6
github.com/containers/buildah
Go
≥ 1.35.0
< 1.35.5
1.35.5
github.com/containers/buildah
Go
< 1.33.12
1.33.12

References

access.redhat.com/errata/rhsa-2025:24... WEB
https://access.redhat.com/errata/RHSA-2025:2454
access.redhat.com/errata/rhsa-2025:24... WEB
https://access.redhat.com/errata/RHSA-2025:2456
access.redhat.com/errata/rhsa-2025:27... WEB
https://access.redhat.com/errata/RHSA-2025:2701
GitHub Advisory / Wiki ADVISORY
https://github.com/containers/buildah/security/advisories/GHSA-5vpc-35f4-r8w6
NVD — CVE-2024-11218 NVD
https://nvd.nist.gov/vuln/detail/CVE-2024-11218
Github.com/containers/buildah Source Repository REPOSITORY
https://github.com/containers/buildah/pull/5918
access.redhat.com/errata/rhsa-2025:08... WEB
https://access.redhat.com/errata/RHSA-2025:0830
access.redhat.com/errata/rhsa-2025:24... WEB
https://access.redhat.com/errata/RHSA-2025:2441
access.redhat.com/errata/rhsa-2025:24... WEB
https://access.redhat.com/errata/RHSA-2025:2443
access.redhat.com/errata/rhsa-2025:27... WEB
https://access.redhat.com/errata/RHSA-2025:2703
access.redhat.com/errata/rhsa-2025:27... WEB
https://access.redhat.com/errata/RHSA-2025:2710
access.redhat.com/errata/rhsa-2025:27... WEB
https://access.redhat.com/errata/RHSA-2025:2712
access.redhat.com/errata/rhsa-2025:35... WEB
https://access.redhat.com/errata/RHSA-2025:3577
access.redhat.com/errata/rhsa-2025:37... WEB
https://access.redhat.com/errata/RHSA-2025:3798
Github.com/containers/buildah Security Information SECURITY
https://access.redhat.com/security/cve/CVE-2024-11218
bugzilla.redhat.com/show_bug.cgi WEB
https://bugzilla.redhat.com/show_bug.cgi?id=2326231
Github.com/containers/buildah Source Repository REPOSITORY
https://github.com/containers/buildah
issues.redhat.com/browse/rhel-67616 WEB
https://issues.redhat.com/browse/RHEL-67616
issues.redhat.com/browse/rhel-67618 WEB
https://issues.redhat.com/browse/RHEL-67618
access.redhat.com/errata/rhsa-2025:08... WEB
https://access.redhat.com/errata/RHSA-2025:0878
access.redhat.com/errata/rhsa-2025:09... WEB
https://access.redhat.com/errata/RHSA-2025:0922
access.redhat.com/errata/rhsa-2025:09... WEB
https://access.redhat.com/errata/RHSA-2025:0923
access.redhat.com/errata/rhsa-2025:11... WEB
https://access.redhat.com/errata/RHSA-2025:1186
access.redhat.com/errata/rhsa-2025:11... WEB
https://access.redhat.com/errata/RHSA-2025:1187
access.redhat.com/errata/rhsa-2025:11... WEB
https://access.redhat.com/errata/RHSA-2025:1188
access.redhat.com/errata/rhsa-2025:11... WEB
https://access.redhat.com/errata/RHSA-2025:1189
access.redhat.com/errata/rhsa-2025:12... WEB
https://access.redhat.com/errata/RHSA-2025:1207
access.redhat.com/errata/rhsa-2025:12... WEB
https://access.redhat.com/errata/RHSA-2025:1275
access.redhat.com/errata/rhsa-2025:12... WEB
https://access.redhat.com/errata/RHSA-2025:1295
access.redhat.com/errata/rhsa-2025:12... WEB
https://access.redhat.com/errata/RHSA-2025:1296
access.redhat.com/errata/rhsa-2025:13... WEB
https://access.redhat.com/errata/RHSA-2025:1372
access.redhat.com/errata/rhsa-2025:14... WEB
https://access.redhat.com/errata/RHSA-2025:1453
access.redhat.com/errata/rhsa-2025:17... WEB
https://access.redhat.com/errata/RHSA-2025:1707
access.redhat.com/errata/rhsa-2025:17... WEB
https://access.redhat.com/errata/RHSA-2025:1713
access.redhat.com/errata/rhsa-2025:19... WEB
https://access.redhat.com/errata/RHSA-2025:1908
access.redhat.com/errata/rhsa-2025:19... WEB
https://access.redhat.com/errata/RHSA-2025:1910
access.redhat.com/errata/rhsa-2025:19... WEB
https://access.redhat.com/errata/RHSA-2025:1914

Frequently Asked Questions

What is CVE-2024-11218?
CVE-2024-11218 is a security vulnerability in Github.com/containers/buildah involving Buildah allows build breakout using malicious Containerfiles and concurrent builds under CWE-269: Improper Privilege Management.
Which Github.com/containers/buildah versions are affected?
Affected versions include releases prior to 1.38.1, 1.37.6, 1.35.5, 1.33.12 across affected packages: github.com/containers/buildah.
What version fixes CVE-2024-11218?
Upgrading to 1.38.1, 1.37.6, 1.35.5, 1.33.12 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/containers/buildah affected?
Yes, github.com/containers/buildah is affected in releases prior to 1.38.1, 1.37.6, 1.35.5, 1.33.12. Upgrade your dependency to 1.38.1, 1.37.6, 1.35.5, 1.33.12 or later.
What is the CVSS score of CVE-2024-11218?
CVE-2024-11218 has a CVSS v3.1 base score of 8.6 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2024-11218?
CVE-2024-11218 is classified under CWE-269: Improper Privilege Management (The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.).
How can I check Go dependencies for CVE-2024-11218?
Run the dependency tree command: 'inspect dependencies for github.com/containers/buildah'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-5vpc-35f4-r8w6",
  "modified" : "2025-10-02T15:37:13Z",
  "published" : "2025-01-21T21:22:49Z",
  "aliases" : [ "CVE-2024-11218" ],
  "summary" : "Buildah allows build breakout using malicious Containerfiles and concurrent builds",
  "details" : "### Impact\nWith 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.\n\n### Patches\nPatches 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.\n\nThis 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.\n\n### Workarounds\nMandatory access controls should limit the access of the process performing the build, on systems where they are enabled.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/containers/buildah"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.38.0"
      }, {
        "fixed" : "1.38.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/containers/buildah"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.37.0"
      }, {
        "fixed" : "1.37.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/containers/buildah"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.35.0"
      }, {
        "fixed" : "1.35.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/containers/buildah"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.33.12"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/containers/buildah/security/advisories/GHSA-5vpc-35f4-r8w6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-11218"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/containers/buildah/pull/5918"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:0830"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:2441"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:2443"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:2454"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:2456"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:2701"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:2703"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:2710"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:2712"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:3577"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:3798"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/security/cve/CVE-2024-11218"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2326231"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/containers/buildah"
  }, {
    "type" : "WEB",
    "url" : "https://issues.redhat.com/browse/RHEL-67616"
  }, {
    "type" : "WEB",
    "url" : "https://issues.redhat.com/browse/RHEL-67618"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:0878"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:0922"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:0923"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:1186"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:1187"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:1188"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:1189"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:1207"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:1275"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:1295"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:1296"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:1372"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:1453"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:1707"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:1713"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:1908"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:1910"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2025:1914"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-269" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-01-21T21:22:49Z",
    "nvd_published_at" : "2025-01-22T05:15:08Z"
  }
}