CVE-2024-7387 is a critical-severity (CVSS 9.1) CWE-250 vulnerability in github.com/openshift/builder. The records list no fixed version yet; check the vendor advisory below and apply the mitigations in the meantime.
Openshift/builder: path traversal allows command injection in privileged buildcontainer using docker build strategy
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA’s SSVC triage for CVE-2024-7387.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
github.com/openshift/builderReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
A flaw was found in openshift/builder. This vulnerability allows command injection via path traversal, where a malicious user can execute arbitrary commands on the OpenShift node running the builder container. When using the “Docker” strategy, executable files inside the privileged build container can be overridden using the spec.source.secrets.secret.destinationDir attribute of the BuildConfig definition. An attacker running code in a privileged container could escalate their permissions on the node running the container.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/openshift/builder | all versions | No fix |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/openshift/builder, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Remediation status
The records we use list no patched version of github.com/openshift/builder for CVE-2024-7387. Check the maintainer's advisory, and where your build allows, override or pin the dependency away from the vulnerable range.
Mitigate without a patch
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
In all versions of OpenShift, the "Custom" build strategy gives developers permission to run arbitrary commands in a privileged container. This is disabled by default, and documentation explicitly warns that this should only be enabled for highly trusted users (eg: cluster admins). We therefore do not consider this…
Cluster admins can follow the instructions in "Securing Builds by Strategy" to block use of the "Docker" build strategy on a cluster, or restrict the use to a set of highly trusted users, until the cluster is able to be upgraded. https://docs.openshift.com/container-platform/4.16/cicd/builds/securing-builds-by-strategy.htmlSource: Red Hat security advisory for CVE-2024-7387 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat OpenShift Container Platform 4.12 | openshift4/ose-docker-builder:v4.12.0-202409121032.p1.g609473f.assembly.stream.el8 | RHSA-2024:6705 |
| Red Hat OpenShift Container Platform 4.13 | openshift4/ose-docker-builder:v4.13.0-202409120505.p1.g2c7e99d.assembly.stream.el8 | RHSA-2024:6691 |
| Red Hat OpenShift Container Platform 4.14 | openshift4/ose-docker-builder:v4.14.0-202409111409.p1.g52565ca.assembly.stream.el8 | RHSA-2024:6689 |
| Red Hat OpenShift Container Platform 4.15 | openshift4/ose-docker-builder:v4.15.0-202409101936.p1.ge7749a3.assembly.stream.el8 | RHSA-2024:6685 |
| Red Hat OpenShift Container Platform 4.16 | openshift4/ose-docker-builder-rhel9:v4.16.0-202409101737.p1.gfee4b58.assembly.stream.el9 | RHSA-2024:6687 |
| Red Hat OpenShift Container Platform 4.17 | openshift4/ose-docker-builder-rhel9:v4.17.0-202409122005.p1.gcfcf3bd.assembly.stream.el9 | RHSA-2024:3718 |
| Red Hat OpenShift Container Platform 4.18 | openshift4/aws-kms-encryption-provider-rhel9:v4.18.0-202501230001.p0.g088dcaf.assembly.stream.el9 | RHSA-2024:6122 |
Frequently Asked Questions
Is CVE-2024-7387 in your dependencies?
Find it across Go, including transitive dependencies.