CVE-2024-23652
BuildKit possible host system access from mount stub cleaner
Reported by github_m · Published January 31, 2024
github.com/moby/buildkit is fixed in 0.12.5 (Go Modules)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| github.com/moby/buildkit | Go Modules | 0.12.5 |
| buildkitd | Wolfi | 0.12.5-r0 |
| kaniko | Wolfi | 1.20.1-r0 |
| docker | Alpine | 25.0.2-r0 |
| scorecard | Chainguard | 4.13.1-r4 |
| conftest | Chainguard | 0.49.0-r1 |
| buildkitd | Chainguard | 0.12.5-r0 |
| trivy | Wolfi | 0.49.0-r1 |
| datadog-agent-fips | Chainguard | 7.50.3-r1 |
| datadog-agent | Wolfi | 7.50.3-r1 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| moby | buildkit | < 0.12.5 |
| wolfi | buildkitd | 0 |
| wolfi | kaniko | 0 |
| alpine | docker | 0 |
| chainguard | scorecard | 0 |
| chainguard | conftest | 0 |
| chainguard | buildkitd | 0 |
| wolfi | trivy | 0 |
| chainguard | datadog-agent-fips | 0 |
| wolfi | datadog-agent | 0 |
| moby | buildkit | 0 |
| chainguard | skaffold | 0 |
| alpine | podman | 0 |
| wolfi | guac | 0 |
| wolfi | skaffold | 0 |
| chainguard | trivy | 0 |
| wolfi | docker | 0 |
| wolfi | conftest | 0 |
| alpine | singularity | 0 |
| chainguard | conftest-fips | 0 |
…and 12 more
Timeline
- Jan 31, 2024 CVE Published
- Feb 8, 2024 EPSS Score (30 in total, the first dated here)
- Feb 8, 2024 PoC Published
- Oct 4, 2024 Coalition ESS Score (11 in total, the first dated here)
- Oct 12, 2025 CVE Updated
- Jan 17, 2026 Security Advisory (41 in total, the first dated here)
- Nov 22, 2026 Distribution Patch (32 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-23652
vulnetix vdb fixes CVE-2024-23652
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-23652/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- https://github.com/moby/buildkit/security/advisories/GHSA-4v98-7qmw-rqr8 x_refsource_CONFIRM
- https://github.com/moby/buildkit/pull/4603 x_refsource_MISC
- https://github.com/moby/buildkit/releases/tag/v0.12.5 x_refsource_MISC
- CVE-2024-23652 exploit
- https://github.com/advisories/GHSA-4v98-7qmw-rqr8 advisory