CVE-2024-23651
BuildKit possible race condition with accessing subpaths from cache mounts
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. 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.
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 |
| conftest | Chainguard | 0.49.0-r1 |
| datadog-agent | Wolfi | 7.50.3-r1 |
| docker | Amazon Linux | 25.0.3-1.amzn2023.0.1 |
| datadog-agent | Chainguard | 7.50.3-r1 |
| skaffold | Chainguard | 2.11.0-r0 |
| guac | Wolfi | 0.4.0-r1 |
| buildkit | Alpine | 0.12.5-r0 |
| conftest-fips | Chainguard | 0.48.0-r2 |
| docker | Chainguard | 25.0.2-r0 |
| kubescape | Chainguard | 3.0.3-r7 |
| kaniko | Wolfi | 1.20.1-r0 |
15 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| moby | buildkit | < 0.12.5 |
| chainguard | conftest | 0 |
| wolfi | datadog-agent | 0 |
| amazon:2023 | docker | 0 |
| chainguard | datadog-agent | 0 |
| chainguard | skaffold | 0 |
| wolfi | guac | 0 |
| alpine | buildkit | 0 |
| chainguard | conftest-fips | 0 |
| chainguard | docker | 0 |
| chainguard | kubescape | 0 |
| wolfi | kaniko | 0 |
| chainguard | buildkitd | 0 |
| chainguard | kaniko | 0 |
| chainguard | scorecard | 0 |
| chainguard | zot | 0 |
| wolfi | scorecard | 0 |
| chainguard | trivy | 0 |
| wolfi | docker | 0 |
| wolfi | kubescape | 0 |
…and 12 more
Timeline
- Jan 31, 2024 CVE Published
- Jan 31, 2024 Fix PR Merged
- Feb 8, 2024 EPSS Score (30 in total, the first dated here)
- Feb 8, 2024 PoC Published
- Oct 4, 2024 Coalition ESS Score (16 in total, the first dated here)
- 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-23651
vulnetix vdb fixes CVE-2024-23651
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-23651/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-m3r6-h7wv-7xxv x_refsource_CONFIRM
- https://github.com/moby/buildkit/pull/4604 x_refsource_MISC
- https://github.com/moby/buildkit/releases/tag/v0.12.5 x_refsource_MISC
- https://github.com/advisories/GHSA-m3r6-h7wv-7xxv advisory