CVE-2024-7387 Openshift/builder: path traversal allows command injection in privileged buildcontainer using docker build strategy
Attackers can execute arbitrary commands on OpenShift nodes via path traversal in privileged build containers using the Docker strategy.
- Exploited in the wild
- Not known
- Login needed
- An administrator
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2024-7387?
CVE-2024-7387 is a critical path traversal vulnerability in Red Hat OpenShift Container Platform 4.12, published on 16 Sep 2024. An attacker needs administrator access to exploit it, with no action from the victim.
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.
Weakness: CWE-250
Which versions are affected by CVE-2024-7387?
3 open source packages ship an affected version, including github.com/openshift/builder.
| Package | Affected | Fixed in |
|---|---|---|
github.com/openshift/builder Go | All versions | None |
github.com/openshift/builder Go | All versions to 4.0.0 | None |
github.com/openshift/builder Go | All versions to 4.0.0 | None |
How do I fix CVE-2024-7387?
No fix has been published for CVE-2024-7387 yet. Limit exposure of the affected software until one is available.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2024-7387 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-7387 exists.
Sources
Also known as GHSA-qqv8-ph7f-h3f7, GO-2024-3129.