Skip to content
Fencer Vulns
critical 10.0

CVE-2024-23652 json

BuildKit possible host system access from mount stub cleaner

published 2024-01-31 2 y ago modified 2026-09-10 1 mo ago also GHSA-4v98-7qmw-rqr8 , GO-2024-2494 , EUVD-2024-0254

cvss
10.0
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
2.5%
EPSS 2.5% chance of exploitation in 30 days, percentile 84%
public exploits
0
none known

Summary

BuildKit is a toolkit for converting source code to build artifacts in an efficient, expressive and repeatable manner. A malicious BuildKit frontend or Dockerfile using RUN --mount could trick the feature that removes empty files created for the mountpoints into removing a file outside the container, from the host system. The issue has been fixed in v0.12.5. Workarounds include avoiding using BuildKit frontends from an untrusted source or building an untrusted Dockerfile containing RUN --mount feature.

Patch / fix

  • go github.com/moby/buildkit 0.12.5
  • mobyproject buildkit 0.12.5
  • docker.io-app Ubuntu 22.04 LTS 27.5.1-0ubuntu3~22.04.2
  • docker.io-app Ubuntu 24.04 LTS 27.5.1-0ubuntu3~24.04.2
  • docker.io Ubuntu Pro 18.04 LTS 20.10.21-0ubuntu1~18.04.3+esm3
  • docker.io Ubuntu Pro 20.04 LTS 20.10.21-0ubuntu1~20.04.6+esm2
  • docker.io Ubuntu Pro 22.04 LTS 20.10.21-0ubuntu1~22.04.7+esm2
  • docker.io Ubuntu Pro 24.04 LTS 20.10.25+dfsg1-2ubuntu1+esm2
  • docker.io-app Ubuntu Pro 20.04 LTS 26.1.3-0ubuntu1~20.04.1+esm1

ubuntu advisories UBUNTU-CVE-2024-23652

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • docker-stable SLES for SAP 15 SP5, SLES for SAP 15 SP4, SLES for SAP 15 SP3 +12 more 24.0.9_ce-150000.1.25.1
  • buildkit Linux Micro 6.0 0.12.5-1.1
  • docker Linux Micro 6.0 25.0.6_ce-1.1
  • docker SLES for SAP 15 SP4, SLES for SAP 15 SP3, SLES for SAP 15 SP2 +18 more 25.0.6_ce-150000.207.1
  • buildah SLES for SAP 15 SP3, SLES 15 SP3-LTSS, SLE High Performance Computing 15 SP3-LTSS +1 more 1.35.4-150300.8.25.1
  • docker SLE Module for Containers 12 25.0.5_ce-98.112.1
  • docker SLE Module for Containers 15 SP5, SLE Module for Containers 15 SP4, SLE Micro 5.5 +18 more 24.0.7_ce-150000.193.1
  • docker SLE Module for Containers 12 24.0.7_ce-98.106.1

suse advisories SUSE-SU-2025:03545-1SUSE-SU-2025:03540-1SUSE-SU-2025:20107-1SUSE-SU-2025:20056-1SUSE-SU-2024:3120-1SUSE-SU-2024:1469-1

  • docker-stable openSUSE Tumbleweed 24.0.9_ce-15.1
  • singularity-ce openSUSE Tumbleweed 4.1.3-1.1
  • buildkit openSUSE Tumbleweed 0.12.5-1.1
  • docker openSUSE Tumbleweed 24.0.7_ce-3.1

opensuse advisories openSUSE-SU-2025:15589-1openSUSE-SU-2024:14059-1openSUSE-SU-2024:13651-1openSUSE-SU-2024:13689-1

  • docker Alpine 3.24, Alpine 3.23, Alpine 3.22 +4 more 25.0.2-r0
  • podman Alpine 3.24, Alpine 3.23, Alpine 3.22 +2 more 4.9.2-r0
  • buildkit Alpine 3.24, Alpine 3.23, Alpine 3.22 +3 more 0.12.5-r0
  • singularity Alpine 3.24, Alpine 3.23, Alpine 3.22 +3 more 4.1.1-r0

alpine advisories ALPINE-CVE-2024-23652

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • moby-engine CBL-Mariner 2.0 20.10.27-4
  • moby-engine Azure Linux 3.0 25.0.3-1

azure linux advisories AZL-34086AZL-35010

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2024-23652 updated cvss 7.8

moby/buildkit: possible host system access from mount stub cleaner

  • Red Hat All currently supported Red Hat products
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
yes
Technical impact
partial
Assessed
2 y ago

Exploit prediction

2.46% chance of exploitation in the next 30 days, higher than 84% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 10.0 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:H
NVD 3.1 9.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
GitHub 3.1 10.0 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:H

Affected packages

ecosystem package affected fixed in
go github.com/moby/buildkit
<0.12.5
0.12.5

Affected products

  • moby buildkit

Classification

Weakness
  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.