CVE-2024-23651BuildKit possible race condition with accessing subpaths from cache mounts
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.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | docker.io | Not affected vulnerable_code_not_present | ||
| Ubuntu 26.04 | docker.io-app | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | docker.io | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | docker.io-app | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | docker.io | Fix pending | 20.10.25+dfsg1-2ubuntu1+esm2 (Ubuntu Pro) | UBUNTU-CVE-2024-23651 |
| Ubuntu 24.04 | docker.io-app | Fixed | 27.5.1-0ubuntu3~24.04.2 | UBUNTU-CVE-2024-23651 |
| Ubuntu 22.04 | docker.io | Fix pending | 20.10.21-0ubuntu1~22.04.7+esm2 (Ubuntu Pro) | UBUNTU-CVE-2024-23651 |
| Ubuntu 22.04 | docker.io-app | Fixed | 27.5.1-0ubuntu3~22.04.2 | UBUNTU-CVE-2024-23651 |
| Ubuntu 20.04 | docker.io | Fix pending | 20.10.21-0ubuntu1~20.04.6+esm2 (Ubuntu Pro) | UBUNTU-CVE-2024-23651 |
| Ubuntu 20.04 | docker.io-app | Fix pending | 26.1.3-0ubuntu1~20.04.1+esm1 (Ubuntu Pro) | UBUNTU-CVE-2024-23651 |
| Ubuntu 18.04 | docker.io | Fix pending | 20.10.21-0ubuntu1~18.04.3+esm3 (Ubuntu Pro) | UBUNTU-CVE-2024-23651 |
| Ubuntu 16.04 | docker.io | Fix pending | ||
| Ubuntu 14.04 | docker.io | Fix pending | ||
| Red Hat Enterprise Linux 9 | buildah | Not affected | ||
| Red Hat Enterprise Linux 9 | buildah-tests | Not affected | ||
| Red Hat Enterprise Linux 9 | podman | Not affected | ||
| Red Hat Enterprise Linux 9 | podman-catatonit | Not affected | ||
| Red Hat Enterprise Linux 9 | podman-docker | Not affected | ||
| Red Hat Enterprise Linux 9 | podman-gvproxy | Not affected | ||
| Red Hat Enterprise Linux 9 | podman-plugins | Not affected | ||
| Red Hat Enterprise Linux 9 | podman-remote | Not affected | ||
| Red Hat Enterprise Linux 9 | podman-tests | Not affected | ||
| Red Hat Enterprise Linux 8 | buildah | Not affected | ||
| Red Hat Enterprise Linux 8 | buildah-tests | Not affected | ||
| Red Hat Enterprise Linux 8 | podman | Not affected | ||
| Red Hat Enterprise Linux 8 | podman-catatonit | Not affected | ||
| Red Hat Enterprise Linux 8 | podman-docker | Not affected | ||
| Red Hat Enterprise Linux 8 | podman-gvproxy | Not affected | ||
| Red Hat Enterprise Linux 8 | podman-manpages | Not affected | ||
| Red Hat Enterprise Linux 8 | podman-plugins | Not affected | ||
| Red Hat Enterprise Linux 8 | podman-remote | Not affected | ||
| Red Hat Enterprise Linux 8 | podman-tests | Not affected | ||
| Alpine Linux 3.24 | buildkit | Fixed | 0.12.5-r0 | ALPINE-CVE-2024-23651 |
| Alpine Linux 3.24 | docker | Fixed | 25.0.2-r0 | ALPINE-CVE-2024-23651 |
| Alpine Linux 3.24 | podman | Fixed | 4.9.2-r0 | ALPINE-CVE-2024-23651 |
| Alpine Linux 3.24 | singularity | Fixed | 4.1.1-r0 | ALPINE-CVE-2024-23651 |
| Alpine Linux 3.23 | buildkit | Fixed | 0.12.5-r0 | ALPINE-CVE-2024-23651 |
| Alpine Linux 3.23 | docker | Fixed | 25.0.2-r0 | ALPINE-CVE-2024-23651 |
| Alpine Linux 3.23 | podman | Fixed | 4.9.2-r0 | ALPINE-CVE-2024-23651 |
| Alpine Linux 3.23 | singularity | Fixed | 4.1.1-r0 | ALPINE-CVE-2024-23651 |
| Alpine Linux 3.22 | buildkit | Fixed | 0.12.5-r0 | ALPINE-CVE-2024-23651 |
| Alpine Linux 3.22 | docker | Fixed | 25.0.2-r0 | ALPINE-CVE-2024-23651 |
| Alpine Linux 3.22 | podman | Fixed | 4.9.2-r0 | ALPINE-CVE-2024-23651 |
| Alpine Linux 3.22 | singularity | Fixed | 4.1.1-r0 | ALPINE-CVE-2024-23651 |
| Alpine Linux 3.21 | buildkit | Fixed | 0.12.5-r0 | ALPINE-CVE-2024-23651 |
| Alpine Linux 3.21 | docker | Fixed | 25.0.2-r0 | ALPINE-CVE-2024-23651 |
| Alpine Linux 3.21 | podman | Fixed | 4.9.2-r0 | ALPINE-CVE-2024-23651 |
| Alpine Linux 3.21 | singularity | Fixed | 4.1.1-r0 | ALPINE-CVE-2024-23651 |
| Alpine Linux 3.20 | buildkit | Fixed | 0.12.5-r0 | ALPINE-CVE-2024-23651 |
| Alpine Linux 3.20 | docker | Fixed | 25.0.2-r0 | ALPINE-CVE-2024-23651 |
| Alpine Linux 3.20 | podman | Fixed | 4.9.2-r0 | ALPINE-CVE-2024-23651 |
| Alpine Linux 3.20 | singularity | Fixed | 4.1.1-r0 | ALPINE-CVE-2024-23651 |
| Alpine Linux 3.19 | buildkit | Fixed | 0.12.5-r0 | ALPINE-CVE-2024-23651 |
| Alpine Linux 3.19 | docker | Fixed | 25.0.2-r0 | ALPINE-CVE-2024-23651 |
| Alpine Linux 3.19 | singularity | Fixed | 4.1.1-r0 | ALPINE-CVE-2024-23651 |
| Alpine Linux 3.18 | docker | Fixed | 25.0.2-r0 | ALPINE-CVE-2024-23651 |
| Go library | github.com/moby/buildkit | Fixed | 0.12.5 | GO-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.
- moby buildkit: affected: < 0.12.5
References
- https://github.com/moby/buildkit/security/advisories/GHSA-m3r6-h7wv-7xxv
- https://github.com/moby/buildkit/pull/4604
- https://github.com/moby/buildkit/releases/tag/v0.12.5
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.