Skip to main content
Mallory
CriticalPublic exploitVulnerability

CVE-2024-7387: OpenShift Builder Docker Build Path Traversal Command Injection

Published Sep 16, 2024 · Updated 2 months ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS9.1Critical · v3.1
EPSS3.4%90th percentile
CISA KEVNoNot listed
In the wildNonePublic exploit, no exploitation reported
IdentifiersCVE-2024-7387CWE-22

CVE-2024-7387 is a path-traversal vulnerability in OpenShift Builder. In builds using the Docker strategy, a malicious BuildConfig can use the secret destinationDir attribute to traverse paths and overwrite executable files within the privileged build container. This can result in command injection and execution of attacker-controlled commands on the OpenShift node hosting the builder container.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation permits arbitrary command execution on the OpenShift node running the privileged builder container. An attacker may escalate privileges from code execution in the build environment to compromise or take over the underlying node.

Mitigation

If you can’t patch tonight, do this now.

Until updates are deployed, restrict untrusted users' ability to create or modify BuildConfig objects and to control secret destination directories. Avoid Docker-strategy builds for untrusted build definitions where feasible, and limit access to privileged build-container workloads.

Remediation

Patch, then assume compromise.

Apply the relevant Red Hat OpenShift Container Platform security update containing the fix for CVE-2024-7387. OpenShift Container Platform 4.16.13 includes remediation for affected 4.16 deployments; administrators should upgrade through the applicable release channel and deploy the updated component images.

Public exploits

Exploits

1 exploit validated by Mallory's analysis. Hidden: 1 not yet analyzed, such as Exploit-DB entries.

View more in app →
cve-2024-7387Repository is a minimal PoC for CVE-2024-7387 targeting OpenShift builds. Structure: (1) `usr_bin` is a symlink containing `/usr/bin`, used to coerce secret mounting into the system binary directory; (2) `Dockerfile` runs `ls -la && cat pwn.txt` so any payload output written to `pwn.txt` becomes visible in build logs; (3) `README.md` provides step-by-step exploitation using OpenShift objects. Exploit flow described: create a Secret (`malicious-secret`) with a key named `cp` whose value is a bash script. Mount that secret in a BuildConfig with `destinationDir: usr_bin`. Because `usr_bin` is a symlink to `/usr/bin`, the mount overwrites `/usr/bin/cp` with the attacker script. A second Secret (`trigger-secret`) is mounted normally; OpenShift internally invokes `cp` while handling/copying build inputs, which now executes the malicious `/usr/bin/cp`. Payload capability: node compromise/persistence. The script mounts a host partition (`/dev/vda4`) to `/mnt/h`, generates an SSH keypair, appends the public key to the worker node’s `core` user `authorized_keys` under the Fedora CoreOS ostree path, fixes permissions/ownership, and writes the private key into `/tmp/build/inputs/pwn.txt`. The Dockerfile then prints `pwn.txt` during the build, allowing the attacker to recover the private key from logs and SSH to `core@WORKER_IP`.tevsho · Disclosed Feb 11, 2026 · dockerfile · markdown · network (cluster API-driven): attacker uses oc/k8s API to create Secrets and a BuildConfig to trigger code execution in the build environment, leading to node-level compromisePoC
FAQ

Frequently asked questions

Is CVE-2024-7387 exploited in the wild?
As of Sep 25, 2026, Mallory has no reports of CVE-2024-7387 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2024-7387?
Yes. Mallory tracks 1 public exploit or proof of concept for CVE-2024-7387, the earliest disclosed Feb 11, 2026.
Is there a patch for CVE-2024-7387?
Apply the relevant Red Hat OpenShift Container Platform security update containing the fix for CVE-2024-7387. OpenShift Container Platform 4.16.13 includes remediation for affected 4.16 deployments; administrators should upgrade through the applicable release channel and deploy the updated component images.
How severe is CVE-2024-7387?
CVE-2024-7387 has a CVSS v3.1 score of 9.1 (Critical) and an EPSS score of 3.4% (90th percentile) as of Sep 25, 2026.
Activity feed

Recent activity

5 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
+1 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activityCommunity discussion across Reddit, Mastodon, and other social sources.