CVE-2024-9407: Github.com/containers/buildah Improper Input Validation Vulnerability
MODERATECVE-2024-9407 is a MODERATE (CVSS 4.7) improper input validation vulnerability (CWE-20: Improper Input Validation) affecting Github.com/containers/buildah libraries in the Go ecosystem. The issue involves improper input validation in buildah and podman. Remediation is available by upgrading affected packages to version 1.37.4, 5.2.4.
CVE-2024-9407 at a Glance
Security Impact
CVSS: 4.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:L/A:N).
How to Fix CVE-2024-9407
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.
Upgrade github.com/containers/buildah to 1.37.4
Upgrade github.com/containers/podman/v5 to 5.2.4
Upgrade github.com/containers/podman to 5.2.4
Upgrade github.com/containers/podman/v2 to 5.2.4
Upgrade github.com/containers/podman/v3 to 5.2.4
Upgrade github.com/containers/podman/v4 to 5.2.4
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-9407, 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.37.4), 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. 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
CVE-2024-9407 Affected Github.com/containers/buildah Versions
6 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/containers/buildah
|
Go |
< 1.37.4
|
1.37.4
|
|
github.com/containers/podman/v5
|
Go |
< 5.2.4
|
5.2.4
|
|
github.com/containers/podman
|
Go |
< 5.2.4
|
5.2.4
|
|
github.com/containers/podman/v2
|
Go |
< 5.2.4
|
5.2.4
|
|
github.com/containers/podman/v3
|
Go |
< 5.2.4
|
5.2.4
|
|
github.com/containers/podman/v4
|
Go |
< 5.2.4
|
5.2.4
|
References
Frequently Asked Questions
What is CVE-2024-9407?
Which Github.com/containers/buildah versions are affected?
What version fixes CVE-2024-9407?
Is github.com/containers/buildah affected?
Is github.com/containers/podman/v5 affected?
What is the CVSS score of CVE-2024-9407?
What CWE is associated with CVE-2024-9407?
How can I check Go dependencies for CVE-2024-9407?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-fhqq-8f65-5xfc",
"modified" : "2024-12-20T15:30:48Z",
"published" : "2024-10-01T21:31:35Z",
"aliases" : [ "CVE-2024-9407" ],
"summary" : "Improper Input Validation in Buildah and Podman",
"details" : "A vulnerability exists in the bind-propagation option of the Dockerfile RUN --mount instruction. The system does not properly validate the input passed to this option, allowing users to pass arbitrary parameters to the mount instruction. This issue can be exploited to mount sensitive directories from the host into a container during the build process and, in some cases, modify the contents of those mounted files. Even if SELinux is used, this vulnerability can bypass its protection by allowing the source directory to be relabeled to give the container access to host files.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:L/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/containers/buildah"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.37.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.37.3"
}
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/containers/podman/v5"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.2.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 5.2.3"
}
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/containers/podman"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.2.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 5.2.3"
}
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/containers/podman/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.2.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 5.2.3"
}
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/containers/podman/v3"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.2.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 5.2.3"
}
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/containers/podman/v4"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.2.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 5.2.3"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-9407"
}, {
"type" : "WEB",
"url" : "https://github.com/containers/buildah/commit/e4e2ad5ca2088d7c388109394135ead7aaf1f4f4"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2024:10147"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2024:8846"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2024:9051"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2024:9454"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2024:9459"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2024:9926"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/security/cve/CVE-2024-9407"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2315887"
}, {
"type" : "WEB",
"url" : "https://github.com/containers/podman/releases/tag/v5.2.4"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2024-3169"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20241220-0010"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-10-01T22:32:05Z",
"nvd_published_at" : "2024-10-01T21:15:08Z"
}
}