CVEfocus › CVE database › CVE-2024-23651

CVE-2024-23651BuildKit possible race condition with accessing subpaths from cache mounts

CVSS 8.7 HighEPSS 0.7% (higher than 49% of CVEs)Published 2024-01-31Updated 2025-05-29Assigner: GitHub_M

BuildKit is a toolkit for converting source code to build artifacts in an efficient, expressive and repeatable manner. Two malicious build steps running in parallel sharing the same cache mounts with subpaths could cause a race condition that can lead to files from the host system being accessible to the build container. The issue has been fixed in v0.12.5. Workarounds include, avoiding using BuildKit frontend from an untrusted source or building an untrusted Dockerfile containing cache mounts with --mount=type=cache,source=... options.

CWE-362

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
23Not 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-23651
Ubuntu 24.04docker.io-appFixed27.5.1-0ubuntu3~24.04.2UBUNTU-CVE-2024-23651
Ubuntu 22.04docker.ioFix pending20.10.21-0ubuntu1~22.04.7+esm2 (Ubuntu Pro)UBUNTU-CVE-2024-23651
Ubuntu 22.04docker.io-appFixed27.5.1-0ubuntu3~22.04.2UBUNTU-CVE-2024-23651
Ubuntu 20.04docker.ioFix pending20.10.21-0ubuntu1~20.04.6+esm2 (Ubuntu Pro)UBUNTU-CVE-2024-23651
Ubuntu 20.04docker.io-appFix pending26.1.3-0ubuntu1~20.04.1+esm1 (Ubuntu Pro)UBUNTU-CVE-2024-23651
Ubuntu 18.04docker.ioFix pending20.10.21-0ubuntu1~18.04.3+esm3 (Ubuntu Pro)UBUNTU-CVE-2024-23651
Ubuntu 16.04docker.ioFix pending
Ubuntu 14.04docker.ioFix pending
Red Hat Enterprise Linux 9buildahNot affected
Red Hat Enterprise Linux 9buildah-testsNot affected
Red Hat Enterprise Linux 9podmanNot affected
Red Hat Enterprise Linux 9podman-catatonitNot affected
Red Hat Enterprise Linux 9podman-dockerNot affected
Red Hat Enterprise Linux 9podman-gvproxyNot affected
Red Hat Enterprise Linux 9podman-pluginsNot affected
Red Hat Enterprise Linux 9podman-remoteNot affected
Red Hat Enterprise Linux 9podman-testsNot affected
Red Hat Enterprise Linux 8buildahNot affected
Red Hat Enterprise Linux 8buildah-testsNot affected
Red Hat Enterprise Linux 8podmanNot affected
Red Hat Enterprise Linux 8podman-catatonitNot affected
Red Hat Enterprise Linux 8podman-dockerNot affected
Red Hat Enterprise Linux 8podman-gvproxyNot affected
Red Hat Enterprise Linux 8podman-manpagesNot affected
Red Hat Enterprise Linux 8podman-pluginsNot affected
Red Hat Enterprise Linux 8podman-remoteNot affected
Red Hat Enterprise Linux 8podman-testsNot affected
Alpine Linux 3.24buildkitFixed0.12.5-r0ALPINE-CVE-2024-23651
Alpine Linux 3.24dockerFixed25.0.2-r0ALPINE-CVE-2024-23651
Alpine Linux 3.24podmanFixed4.9.2-r0ALPINE-CVE-2024-23651
Alpine Linux 3.24singularityFixed4.1.1-r0ALPINE-CVE-2024-23651
Alpine Linux 3.23buildkitFixed0.12.5-r0ALPINE-CVE-2024-23651
Alpine Linux 3.23dockerFixed25.0.2-r0ALPINE-CVE-2024-23651
Alpine Linux 3.23podmanFixed4.9.2-r0ALPINE-CVE-2024-23651
Alpine Linux 3.23singularityFixed4.1.1-r0ALPINE-CVE-2024-23651
Alpine Linux 3.22buildkitFixed0.12.5-r0ALPINE-CVE-2024-23651
Alpine Linux 3.22dockerFixed25.0.2-r0ALPINE-CVE-2024-23651
Alpine Linux 3.22podmanFixed4.9.2-r0ALPINE-CVE-2024-23651
Alpine Linux 3.22singularityFixed4.1.1-r0ALPINE-CVE-2024-23651
Alpine Linux 3.21buildkitFixed0.12.5-r0ALPINE-CVE-2024-23651
Alpine Linux 3.21dockerFixed25.0.2-r0ALPINE-CVE-2024-23651
Alpine Linux 3.21podmanFixed4.9.2-r0ALPINE-CVE-2024-23651
Alpine Linux 3.21singularityFixed4.1.1-r0ALPINE-CVE-2024-23651
Alpine Linux 3.20buildkitFixed0.12.5-r0ALPINE-CVE-2024-23651
Alpine Linux 3.20dockerFixed25.0.2-r0ALPINE-CVE-2024-23651
Alpine Linux 3.20podmanFixed4.9.2-r0ALPINE-CVE-2024-23651
Alpine Linux 3.20singularityFixed4.1.1-r0ALPINE-CVE-2024-23651
Alpine Linux 3.19buildkitFixed0.12.5-r0ALPINE-CVE-2024-23651
Alpine Linux 3.19dockerFixed25.0.2-r0ALPINE-CVE-2024-23651
Alpine Linux 3.19singularityFixed4.1.1-r0ALPINE-CVE-2024-23651
Alpine Linux 3.18dockerFixed25.0.2-r0ALPINE-CVE-2024-23651
Go librarygithub.com/moby/buildkitFixed0.12.5GO-2024-2493

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.