CVE-2024-7387
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
Summary
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 Software
| Vendor | Product | Version Range | Status |
|---|---|---|---|
0 < 0b62633adfa2836465202bc851885e078ec888d1 | affected | ||
| Red Hat | Red Hat OpenShift Container Platform 4.12 | v4.12.0-202409121032.p1.g609473f.assembly.stream.el8 < * | unaffected |
| Red Hat | Red Hat OpenShift Container Platform 4.13 | v4.13.0-202409120505.p1.g2c7e99d.assembly.stream.el8 < * | unaffected |
| Red Hat | Red Hat OpenShift Container Platform 4.14 | v4.14.0-202409111409.p1.g52565ca.assembly.stream.el8 < * | unaffected |
| Red Hat | Red Hat OpenShift Container Platform 4.15 | v4.15.0-202409101936.p1.ge7749a3.assembly.stream.el8 < * | unaffected |
| Red Hat | Red Hat OpenShift Container Platform 4.16 | v4.16.0-202409101737.p1.gfee4b58.assembly.stream.el9 < * | unaffected |
| Red Hat | Red Hat OpenShift Container Platform 4.17 | v4.17.0-202409122005.p1.gcfcf3bd.assembly.stream.el9 < * | unaffected |
Weaknesses
- CWE-250: Execution with Unnecessary Privileges
Workarounds
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.html
ADP Enrichment
CISA ADP Vulnrichment
- SSVC:
- Exploitation: poc
- Automatable: no
- Technical Impact: total
References
- https://access.redhat.com/errata/RHSA-2024:3718
- https://access.redhat.com/errata/RHSA-2024:6685
- https://access.redhat.com/errata/RHSA-2024:6687
- https://access.redhat.com/errata/RHSA-2024:6689
- https://access.redhat.com/errata/RHSA-2024:6691
- https://access.redhat.com/errata/RHSA-2024:6705
- https://access.redhat.com/security/cve/CVE-2024-7387
- https://bugzilla.redhat.com/show_bug.cgi?id=2302259
- https://github.com/openshift/builder/commit/0b62633adfa2836465202bc851885e078ec888d1
- https://stuxxn.github.io/advisory/2024/10/02/openshift-build-docker-priv-esc.html
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.