CVE-2024-7387
Openshift/builder: path traversal allows command injection in privileged buildcontainer using docker build strategy
CRITICAL 9.1
At a glance
- Source
- NVD
- EPSS
- EPSS 2.32 % · percentile 83 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- redhat
- NVD status
- Deferred
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.
Weaknesses (CWE)
- CWE-250 — Execution with Unnecessary Privileges
References
- https://access.redhat.com/errata/RHSA-2024:3718
- https://access.redhat.com/errata/RHSA-2024:6122
- 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
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.1 | CRITICAL 9.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H | redhat |
| CVSS 3.1 | CRITICAL 9.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H | NVD · secalert@redhat.com (Secondary) |
Advisories
- GHSA-qqv8-ph7f-h3f7 — OpenShift Builder has a path traversal, allows command injection in privileged BuildContainer
- GO-2024-3129 — OpenShift Builder has a path traversal, allows command injection in privileged BuildContainer in github.com/openshift/builder
European references
- ENISA EUVD · EUVD-2024-2857
- GCVE · GCVE-0-2024-7387
Affected products
| Product | Versions |
|---|---|
| openshift/builder | affected 0 < 0b62633adfa2836465202bc851885e078ec888d1 |
| Red Hat · Red Hat OpenShift Container Platform 4.12 | unaffected v4.12.0-202409121032.p1.g609473f.assembly.stream.el8 < * |
| Red Hat · Red Hat OpenShift Container Platform 4.13 | unaffected v4.13.0-202409120505.p1.g2c7e99d.assembly.stream.el8 < * |
| Red Hat · Red Hat OpenShift Container Platform 4.14 | unaffected v4.14.0-202409111409.p1.g52565ca.assembly.stream.el8 < * |
| Red Hat · Red Hat OpenShift Container Platform 4.15 | unaffected v4.15.0-202409101936.p1.ge7749a3.assembly.stream.el8 < * |
| Red Hat · Red Hat OpenShift Container Platform 4.16 | unaffected v4.16.0-202409101737.p1.gfee4b58.assembly.stream.el9 < * |
| Red Hat · Red Hat OpenShift Container Platform 4.17 | unaffected v4.17.0-202409122005.p1.gcfcf3bd.assembly.stream.el9 < * |
| Red Hat · Red Hat OpenShift Container Platform 4.18 | unaffected v4.18.0-202501230001.p0.g088dcaf.assembly.stream.el9 < * |
| Red Hat · Red Hat OpenShift Container Platform 4.18 | unaffected v4.18.0-202501230001.p0.gd4fb1b6.assembly.stream.el9 < * |
| Red Hat · Red Hat OpenShift Container Platform 4.18 | unaffected v4.18.0-202501230001.p0.g11ced00.assembly.stream.el9 < * |
| Red Hat · Red Hat OpenShift Container Platform 4.18 | unaffected v4.18.0-202501230001.p0.gf648c78.assembly.stream.el9 < * |
| Red Hat · Red Hat OpenShift Container Platform 4.18 | unaffected v4.18.0-202501230001.p0.g24a6532.assembly.stream.el9 < * |
| Red Hat · Red Hat OpenShift Container Platform 4.18 | unaffected v4.18.0-202502100301.p0.g2e139ed.assembly.stream.el9 < * |
| Red Hat · Red Hat OpenShift Container Platform 4.18 | unaffected v4.18.0-202501230001.p0.g3193a75.assembly.stream.el9 < * |
| Red Hat · Red Hat OpenShift Container Platform 4.18 | unaffected v4.18.0-202502041302.p0.g1ad8f2e.assembly.stream.el9 < * |
| Red Hat · Red Hat OpenShift Container Platform 4.18 | unaffected v4.18.0-202501230001.p0.g7149f2d.assembly.stream.el9 < * |
| Red Hat · Red Hat OpenShift Container Platform 4.18 | unaffected v4.18.0-202501230001.p0.g7149f2d.assembly.stream.el9 < * |
| Red Hat · Red Hat OpenShift Container Platform 4.18 | unaffected v4.18.0-202501230001.p0.g962ccca.assembly.stream.el9 < * |
| Red Hat · Red Hat OpenShift Container Platform 4.18 | unaffected v4.18.0-202501230001.p0.gba2234b.assembly.stream.el9 < * |
| Red Hat · Red Hat OpenShift Container Platform 4.18 | unaffected v4.18.0-202502111035.p0.gf76635f.assembly.stream.el9 < * |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |