---
id: CVE-2024-7387
title: A flaw was found in openshift/builder
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” str…
severity: critical
cvss: 9.1
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H'
cwe:
  - CWE-250
published: '2024-09-17'
updated: '2026-08-11'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2024-7387'
references:
  - url: 'https://access.redhat.com/errata/RHSA-2024:3718'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2024:6122'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2024:6685'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2024:6687'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2024:6689'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2024:6691'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2024:6705'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/security/cve/CVE-2024-7387'
    label: secalert@redhat.com
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2302259'
    label: secalert@redhat.com
  - url: >-
      https://github.com/openshift/builder/commit/0b62633adfa2836465202bc851885e078ec888d1
    label: secalert@redhat.com
  - url: >-
      https://stuxxn.github.io/advisory/2024/10/02/openshift-build-docker-priv-esc.html
    label: secalert@redhat.com
tags:
  - nvd
epss: 0.02301
epssPercentile: 0.82577
ingestedAt: '2026-08-11T16:47:03.257Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
