CVEfocus › CVE database › CVE-2024-23652

CVE-2024-23652BuildKit possible host system access from mount stub cleaner

CVSS 10.0 CriticalEPSS 2.5% (higher than 85% of CVEs)Published 2024-01-31Updated 2025-06-17Assigner: GitHub_M

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.

CWE-22

What to do

Fixed builds are available from Alpine, Go, Ubuntu: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

27Fixed
7Fix pending
4Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04docker.ioNot affected
vulnerable_code_not_present
Ubuntu 26.04docker.io-appNot affected
vulnerable_code_not_present
Ubuntu 25.10docker.ioNot affected
vulnerable_code_not_present
Ubuntu 25.10docker.io-appNot affected
vulnerable_code_not_present
Ubuntu 24.04docker.ioFix pending20.10.25+dfsg1-2ubuntu1+esm2 (Ubuntu Pro)UBUNTU-CVE-2024-23652
Ubuntu 24.04docker.io-appFixed27.5.1-0ubuntu3~24.04.2UBUNTU-CVE-2024-23652
Ubuntu 22.04docker.ioFix pending20.10.21-0ubuntu1~22.04.7+esm2 (Ubuntu Pro)UBUNTU-CVE-2024-23652
Ubuntu 22.04docker.io-appFixed27.5.1-0ubuntu3~22.04.2UBUNTU-CVE-2024-23652
Ubuntu 20.04docker.ioFix pending20.10.21-0ubuntu1~20.04.6+esm2 (Ubuntu Pro)UBUNTU-CVE-2024-23652
Ubuntu 20.04docker.io-appFix pending26.1.3-0ubuntu1~20.04.1+esm1 (Ubuntu Pro)UBUNTU-CVE-2024-23652
Ubuntu 18.04docker.ioFix pending20.10.21-0ubuntu1~18.04.3+esm3 (Ubuntu Pro)UBUNTU-CVE-2024-23652
Ubuntu 16.04docker.ioFix pendingUBUNTU-CVE-2024-23652
Ubuntu 14.04docker.ioFix pending
Alpine Linux 3.24buildkitFixed0.12.5-r0ALPINE-CVE-2024-23652
Alpine Linux 3.24dockerFixed25.0.2-r0ALPINE-CVE-2024-23652
Alpine Linux 3.24podmanFixed4.9.2-r0ALPINE-CVE-2024-23652
Alpine Linux 3.24singularityFixed4.1.1-r0ALPINE-CVE-2024-23652
Alpine Linux 3.23buildkitFixed0.12.5-r0ALPINE-CVE-2024-23652
Alpine Linux 3.23dockerFixed25.0.2-r0ALPINE-CVE-2024-23652
Alpine Linux 3.23podmanFixed4.9.2-r0ALPINE-CVE-2024-23652
Alpine Linux 3.23singularityFixed4.1.1-r0ALPINE-CVE-2024-23652
Alpine Linux 3.22buildkitFixed0.12.5-r0ALPINE-CVE-2024-23652
Alpine Linux 3.22dockerFixed25.0.2-r0ALPINE-CVE-2024-23652
Alpine Linux 3.22podmanFixed4.9.2-r0ALPINE-CVE-2024-23652
Alpine Linux 3.22singularityFixed4.1.1-r0ALPINE-CVE-2024-23652
Alpine Linux 3.21buildkitFixed0.12.5-r0ALPINE-CVE-2024-23652
Alpine Linux 3.21dockerFixed25.0.2-r0ALPINE-CVE-2024-23652
Alpine Linux 3.21podmanFixed4.9.2-r0ALPINE-CVE-2024-23652
Alpine Linux 3.21singularityFixed4.1.1-r0ALPINE-CVE-2024-23652
Alpine Linux 3.20buildkitFixed0.12.5-r0ALPINE-CVE-2024-23652
Alpine Linux 3.20dockerFixed25.0.2-r0ALPINE-CVE-2024-23652
Alpine Linux 3.20podmanFixed4.9.2-r0ALPINE-CVE-2024-23652
Alpine Linux 3.20singularityFixed4.1.1-r0ALPINE-CVE-2024-23652
Alpine Linux 3.19buildkitFixed0.12.5-r0ALPINE-CVE-2024-23652
Alpine Linux 3.19dockerFixed25.0.2-r0ALPINE-CVE-2024-23652
Alpine Linux 3.19singularityFixed4.1.1-r0ALPINE-CVE-2024-23652
Alpine Linux 3.18dockerFixed25.0.2-r0ALPINE-CVE-2024-23652
Go librarygithub.com/moby/buildkitFixed0.12.5GO-2024-2494

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.