Vulnerability · Published Sep 16, 2024 · Assigned by redhat
CVE-2024-7387Openshift/builder: path traversal allows command injection in privileged buildcontainer using docker build strategy
Critical 9.1
In plain English
A critical-severity security flaw in openshift/builder. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 2.3% (higher than 84% of all known vulnerabilities).
Official 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 & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Go | github.com/openshift/builder | no fix listed | GHSA-qqv8-ph7f-h3f7 |
| Go | github.com/openshift/builder | no fix listed | GO-2024-3129 |
Affected products (as reported)
Weakness: CWE-250 · Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
References
- RHSA-2024:3718 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:6122 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:6685 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:6687 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:6689 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:6691 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:6705 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/security/cve/CVE-2024-7387 vdb-entry, x_refsource_REDHAT
- RHBZ#2302259 issue-tracking, x_refsource_REDHAT
- https://github.com/openshift/builder/commit/0b62633adfa2836465202bc851885e078ec888d1
- https://stuxxn.github.io/advisory/2024/10/02/openshift-build-docker-priv-esc.html