{
  "threat_severity" : "Important",
  "public_date" : "2024-09-16T08:00:00Z",
  "bugzilla" : {
    "description" : "openshift/builder: Path traversal allows command injection in privileged BuildContainer using docker build strategy",
    "id" : "2302259",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2302259"
  },
  "cvss3" : {
    "cvss3_base_score" : "9.1",
    "cvss3_scoring_vector" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H",
    "status" : "verified"
  },
  "cwe" : "CWE-250",
  "details" : [ "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.", "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." ],
  "statement" : "In all versions of OpenShift, the \"Custom\" build strategy gives developers permission to run arbitrary commands in a privileged container. This is disabled by default, and documentation explicitly warns that this should only be enabled for highly trusted users (eg: cluster admins). We therefore do not consider this vulnerability a privilege escalation path for \"Custom\" strategy builds.\nMicroshift is not affected by this vulnerability. MicroShift does not include this OpenShift API.\nThe Builds for Red Hat OpenShift Operator based on Shipwright is not affected by this vulnerability.",
  "acknowledgement" : "Red Hat would like to thank Armin Stock for reporting this issue.",
  "affected_release" : [ {
    "product_name" : "Red Hat OpenShift Container Platform 4.12",
    "release_date" : "2024-09-19T00:00:00Z",
    "advisory" : "RHSA-2024:6705",
    "cpe" : "cpe:/a:redhat:openshift:4.12::el8",
    "package" : "openshift4/ose-docker-builder:v4.12.0-202409121032.p1.g609473f.assembly.stream.el8"
  }, {
    "product_name" : "Red Hat OpenShift Container Platform 4.13",
    "release_date" : "2024-09-19T00:00:00Z",
    "advisory" : "RHSA-2024:6691",
    "cpe" : "cpe:/a:redhat:openshift:4.13::el8",
    "package" : "openshift4/ose-docker-builder:v4.13.0-202409120505.p1.g2c7e99d.assembly.stream.el8"
  }, {
    "product_name" : "Red Hat OpenShift Container Platform 4.14",
    "release_date" : "2024-09-19T00:00:00Z",
    "advisory" : "RHSA-2024:6689",
    "cpe" : "cpe:/a:redhat:openshift:4.14::el8",
    "package" : "openshift4/ose-docker-builder:v4.14.0-202409111409.p1.g52565ca.assembly.stream.el8"
  }, {
    "product_name" : "Red Hat OpenShift Container Platform 4.15",
    "release_date" : "2024-09-19T00:00:00Z",
    "advisory" : "RHSA-2024:6685",
    "cpe" : "cpe:/a:redhat:openshift:4.15::el8",
    "package" : "openshift4/ose-docker-builder:v4.15.0-202409101936.p1.ge7749a3.assembly.stream.el8"
  }, {
    "product_name" : "Red Hat OpenShift Container Platform 4.16",
    "release_date" : "2024-09-19T00:00:00Z",
    "advisory" : "RHSA-2024:6687",
    "cpe" : "cpe:/a:redhat:openshift:4.16::el9",
    "package" : "openshift4/ose-docker-builder-rhel9:v4.16.0-202409101737.p1.gfee4b58.assembly.stream.el9"
  }, {
    "product_name" : "Red Hat OpenShift Container Platform 4.17",
    "release_date" : "2024-10-01T00:00:00Z",
    "advisory" : "RHSA-2024:3718",
    "cpe" : "cpe:/a:redhat:openshift:4.17::el9",
    "package" : "openshift4/ose-docker-builder-rhel9:v4.17.0-202409122005.p1.gcfcf3bd.assembly.stream.el9"
  } ],
  "references" : [ "https://www.cve.org/CVERecord?id=CVE-2024-7387\nhttps://nvd.nist.gov/vuln/detail/CVE-2024-7387\nhttps://github.com/openshift/builder/commit/0b62633adfa2836465202bc851885e078ec888d1\nhttps://stuxxn.github.io/advisory/2024/10/02/openshift-build-docker-priv-esc.html" ],
  "name" : "CVE-2024-7387",
  "mitigation" : {
    "value" : "Cluster admins can follow the instructions in \"Securing Builds by Strategy\" to block use of the \"Docker\" build strategy on a cluster, or restrict the use to a set of highly trusted users, until the cluster is able to be upgraded.\nhttps://docs.openshift.com/container-platform/4.16/cicd/builds/securing-builds-by-strategy.html",
    "lang" : "en:us"
  },
  "csaw" : false
}