CVE-2024-23652BuildKit possible host system access from mount stub cleaner
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.
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-23652 |
| Ubuntu 24.04 | docker.io-app | Fixed | 27.5.1-0ubuntu3~24.04.2 | UBUNTU-CVE-2024-23652 |
| Ubuntu 22.04 | docker.io | Fix pending | 20.10.21-0ubuntu1~22.04.7+esm2 (Ubuntu Pro) | UBUNTU-CVE-2024-23652 |
| Ubuntu 22.04 | docker.io-app | Fixed | 27.5.1-0ubuntu3~22.04.2 | UBUNTU-CVE-2024-23652 |
| Ubuntu 20.04 | docker.io | Fix pending | 20.10.21-0ubuntu1~20.04.6+esm2 (Ubuntu Pro) | UBUNTU-CVE-2024-23652 |
| Ubuntu 20.04 | docker.io-app | Fix pending | 26.1.3-0ubuntu1~20.04.1+esm1 (Ubuntu Pro) | UBUNTU-CVE-2024-23652 |
| Ubuntu 18.04 | docker.io | Fix pending | 20.10.21-0ubuntu1~18.04.3+esm3 (Ubuntu Pro) | UBUNTU-CVE-2024-23652 |
| Ubuntu 16.04 | docker.io | Fix pending | UBUNTU-CVE-2024-23652 | |
| Ubuntu 14.04 | docker.io | Fix pending | ||
| Alpine Linux 3.24 | buildkit | Fixed | 0.12.5-r0 | ALPINE-CVE-2024-23652 |
| Alpine Linux 3.24 | docker | Fixed | 25.0.2-r0 | ALPINE-CVE-2024-23652 |
| Alpine Linux 3.24 | podman | Fixed | 4.9.2-r0 | ALPINE-CVE-2024-23652 |
| Alpine Linux 3.24 | singularity | Fixed | 4.1.1-r0 | ALPINE-CVE-2024-23652 |
| Alpine Linux 3.23 | buildkit | Fixed | 0.12.5-r0 | ALPINE-CVE-2024-23652 |
| Alpine Linux 3.23 | docker | Fixed | 25.0.2-r0 | ALPINE-CVE-2024-23652 |
| Alpine Linux 3.23 | podman | Fixed | 4.9.2-r0 | ALPINE-CVE-2024-23652 |
| Alpine Linux 3.23 | singularity | Fixed | 4.1.1-r0 | ALPINE-CVE-2024-23652 |
| Alpine Linux 3.22 | buildkit | Fixed | 0.12.5-r0 | ALPINE-CVE-2024-23652 |
| Alpine Linux 3.22 | docker | Fixed | 25.0.2-r0 | ALPINE-CVE-2024-23652 |
| Alpine Linux 3.22 | podman | Fixed | 4.9.2-r0 | ALPINE-CVE-2024-23652 |
| Alpine Linux 3.22 | singularity | Fixed | 4.1.1-r0 | ALPINE-CVE-2024-23652 |
| Alpine Linux 3.21 | buildkit | Fixed | 0.12.5-r0 | ALPINE-CVE-2024-23652 |
| Alpine Linux 3.21 | docker | Fixed | 25.0.2-r0 | ALPINE-CVE-2024-23652 |
| Alpine Linux 3.21 | podman | Fixed | 4.9.2-r0 | ALPINE-CVE-2024-23652 |
| Alpine Linux 3.21 | singularity | Fixed | 4.1.1-r0 | ALPINE-CVE-2024-23652 |
| Alpine Linux 3.20 | buildkit | Fixed | 0.12.5-r0 | ALPINE-CVE-2024-23652 |
| Alpine Linux 3.20 | docker | Fixed | 25.0.2-r0 | ALPINE-CVE-2024-23652 |
| Alpine Linux 3.20 | podman | Fixed | 4.9.2-r0 | ALPINE-CVE-2024-23652 |
| Alpine Linux 3.20 | singularity | Fixed | 4.1.1-r0 | ALPINE-CVE-2024-23652 |
| Alpine Linux 3.19 | buildkit | Fixed | 0.12.5-r0 | ALPINE-CVE-2024-23652 |
| Alpine Linux 3.19 | docker | Fixed | 25.0.2-r0 | ALPINE-CVE-2024-23652 |
| Alpine Linux 3.19 | singularity | Fixed | 4.1.1-r0 | ALPINE-CVE-2024-23652 |
| Alpine Linux 3.18 | docker | Fixed | 25.0.2-r0 | ALPINE-CVE-2024-23652 |
| Go library | github.com/moby/buildkit | Fixed | 0.12.5 | GO-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.
- moby buildkit: affected: < 0.12.5
References
- https://github.com/moby/buildkit/security/advisories/GHSA-4v98-7qmw-rqr8
- https://github.com/moby/buildkit/pull/4603
- 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.