CVE-2024-7387: Openshift/builder: path traversal allows command injection in privileged buildcontainer using docker build strategy
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.
Security readout for executives and security teams
Plain-English summary
A user able to control an OpenShift Docker-strategy build can abuse a secret destination path to replace programs inside the privileged builder container. Those programs may then run attacker-controlled commands on the worker node, potentially compromising its data, workloads, and availability.
Executive priority
Treat as an urgent platform remediation for clusters permitting Docker-strategy builds. Prioritize shared or sensitive worker nodes because successful abuse can move from build permissions to node control. Exposure is narrower than an unauthenticated attack, but potential confidentiality, integrity, and availability impact is severe.
Technical view
CVE-2024-7387 is a path-traversal-driven command-injection flaw in openshift/builder. A crafted BuildConfig spec.source.secrets.secret.destinationDir can overwrite executable files in a privileged Docker build container. Subsequent execution may cross the container boundary and escalate privileges on the hosting node. The supplied CVSS 3.1 score is 9.1 with high privileges required.
Likely exposure
Exposure is most likely where Red Hat OpenShift uses Docker-strategy builds and users can create or modify relevant BuildConfigs. The bundle explicitly identifies ose-docker-builder packages for OpenShift 4.12 through 4.17. Its 4.18 records reference seemingly unrelated packages, so exact 4.18 applicability requires confirmation from Red Hat.
Exploitation context
The CVSS vector indicates network reachability, low complexity, no user interaction, changed scope, and high privileges required. The bundle marks CISA KEV as false and provides no evidence of active exploitation. A public technical disclosure and corrective source commit exist, increasing reproducibility for qualified researchers.
Researcher notes
The described primitive is controlled file placement through destinationDir, followed by executable replacement within a privileged builder. CWE-250 reflects excessive execution privilege, although path traversal is central to the mechanism. The source bundle’s OpenShift 4.18 package entries do not consistently name the builder component; do not infer those unrelated packages are vulnerable without vendor confirmation.
Mitigation direction
Apply the fixed OpenShift updates identified by Red Hat’s applicable security advisory.
Restrict permission to create, modify, or trigger Docker-strategy BuildConfigs to trusted administrators.
Temporarily disable unnecessary Docker-strategy builds where patching cannot be completed promptly.
Review secret destinationDir values and reject paths capable of escaping intended directories.
Follow Red Hat guidance for affected releases whose package mapping is unclear.
Validation and detection
Inventory OpenShift versions and builder image packages across every cluster.
Identify namespaces using Docker build strategy and secret destinationDir settings.
Compare installed package releases with the applicable Red Hat security advisories.
Audit RBAC for principals able to modify BuildConfigs or trigger Docker builds.
Review build, audit, and node telemetry for unexpected executable replacement or privileged command activity.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-250: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
The CVE wording references authentication or credential exposure, so valid-account and credential-access review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
The CVE wording references file access or upload behavior, so file telemetry and web shell review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
The affected technology mentions containers, so container-specific ATT&CK technique review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
5Timeline events
1ADP providers
12Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: pocAutomatable: noTechnical Impact: total
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
Red HatRed Hat OpenShift Container Platform 4.12openshift4/ose-docker-builder, v4.12.0-202409121032.p1.g609473f.assembly.stream.el8affected
Red HatRed Hat OpenShift Container Platform 4.13openshift4/ose-docker-builder, v4.13.0-202409120505.p1.g2c7e99d.assembly.stream.el8affected
Red HatRed Hat OpenShift Container Platform 4.14openshift4/ose-docker-builder, v4.14.0-202409111409.p1.g52565ca.assembly.stream.el8affected
Red HatRed Hat OpenShift Container Platform 4.15openshift4/ose-docker-builder, v4.15.0-202409101936.p1.ge7749a3.assembly.stream.el8affected
Red HatRed Hat OpenShift Container Platform 4.16openshift4/ose-docker-builder-rhel9, v4.16.0-202409101737.p1.gfee4b58.assembly.stream.el9affected
Red HatRed Hat OpenShift Container Platform 4.17openshift4/ose-docker-builder-rhel9, v4.17.0-202409122005.p1.gcfcf3bd.assembly.stream.el9affected
Red HatRed Hat OpenShift Container Platform 4.18openshift4/aws-kms-encryption-provider-rhel9, v4.18.0-202501230001.p0.g088dcaf.assembly.stream.el9affected
Red HatRed Hat OpenShift Container Platform 4.18openshift4/azure-kms-encryption-provider-rhel9, v4.18.0-202501230001.p0.gd4fb1b6.assembly.stream.el9affected
Red HatRed Hat OpenShift Container Platform 4.18openshift4/azure-service-rhel9-operator, v4.18.0-202501230001.p0.g11ced00.assembly.stream.el9affected
Red HatRed Hat OpenShift Container Platform 4.18openshift4/cloud-network-config-controller-rhel9, v4.18.0-202501230001.p0.gf648c78.assembly.stream.el9affected
Red HatRed Hat OpenShift Container Platform 4.18openshift4/container-networking-plugins-microshift-rhel9, v4.18.0-202501230001.p0.g24a6532.assembly.stream.el9affected
Red HatRed Hat OpenShift Container Platform 4.18openshift4/driver-toolkit-rhel9, v4.18.0-202502100301.p0.g2e139ed.assembly.stream.el9affected
Red HatRed Hat OpenShift Container Platform 4.18openshift4/egress-router-cni-rhel9, v4.18.0-202501230001.p0.g3193a75.assembly.stream.el9affected
Red HatRed Hat OpenShift Container Platform 4.18openshift4/frr-rhel9, v4.18.0-202502041302.p0.g1ad8f2e.assembly.stream.el9affected
Red HatRed Hat OpenShift Container Platform 4.18openshift4/insights-runtime-exporter-rhel9, v4.18.0-202501230001.p0.g7149f2d.assembly.stream.el9affected
Red HatRed Hat OpenShift Container Platform 4.18openshift4/insights-runtime-extractor-rhel9, v4.18.0-202501230001.p0.g7149f2d.assembly.stream.el9affected
Red HatRed Hat OpenShift Container Platform 4.18openshift4/kube-metrics-server-rhel9, v4.18.0-202501230001.p0.g962ccca.assembly.stream.el9affected
Red HatRed Hat OpenShift Container Platform 4.18openshift4/kubevirt-csi-driver-rhel9, v4.18.0-202501230001.p0.gba2234b.assembly.stream.el9affected
Red HatRed Hat OpenShift Container Platform 4.18openshift4/network-tools-rhel9, v4.18.0-202502111035.p0.gf76635f.assembly.stream.el9affected
Red HatRed Hat OpenShift Container Platform 4.18openshift4/oc-mirror-plugin-rhel9, v4.18.0-202502100934.p0.gc00c7c9.assembly.stream.el9affected
Red HatRed Hat OpenShift Container Platform 4.18openshift4/openshift-route-controller-manager-rhel9, v4.18.0-202501230001.p0.g07daee4.assembly.stream.el9affected
Red HatRed Hat OpenShift Container Platform 4.18openshift4/ose-agent-installer-api-server-rhel9, v4.18.0-202502040032.p0.ge5a4005.assembly.stream.el9affected
Red HatRed Hat OpenShift Container Platform 4.18openshift4/ose-agent-installer-csr-approver-rhel9, v4.18.0-202502040032.p0.g5348c85.assembly.stream.el9affected
Red HatRed Hat OpenShift Container Platform 4.18openshift4/ose-agent-installer-node-agent-rhel9, v4.18.0-202502041302.p0.g51a74ac.assembly.stream.el9affected
Red HatRed Hat OpenShift Container Platform 4.18openshift4/ose-agent-installer-orchestrator-rhel9, v4.18.0-202501230001.p0.g5348c85.assembly.stream.el9affected
Red HatRed Hat OpenShift Container Platform 4.18openshift4/ose-agent-installer-utils-rhel9, v4.18.0-202501230001.p0.g3f6d1d8.assembly.stream.el9affected
Red HatRed Hat OpenShift Container Platform 4.18openshift4/ose-apiserver-network-proxy-rhel9, v4.18.0-202501230001.p0.g0e11616.assembly.stream.el9affected
Red HatRed Hat OpenShift Container Platform 4.18openshift4/ose-aws-cloud-controller-manager-rhel9, v4.18.0-202501230001.p0.gc395190.assembly.stream.el9affected
Red HatRed Hat OpenShift Container Platform 4.18openshift4/ose-aws-cluster-api-controllers-rhel9, v4.18.0-202501230001.p0.g6bd77fc.assembly.stream.el9affected
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-250 · source CWE mapping
Execution with Unnecessary Privileges
Execution with Unnecessary Privileges represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.