CVE-2024-23651 | BuildKit 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.

Published: 2024-01-31 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2024-23651 is rated Moderate Risk (58.6/100): CVSS High severity, with medium exploitation likelihood (EPSS 0.55%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2024-23651

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-05-09 0.56% 0.55% -0.01%
2 2026-04-26 0.47% 0.56% +0.09%
3 2025-11-21 0.47%

Full EPSS history (15 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2024-23651

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
8.7 3.1 HIGH
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
2.2 5.8 [email protected]
7.4 3.1 HIGH
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
2.2 5.2 [email protected]

Weakness enumeration for CVE-2024-23651

GitHub Security Advisory for CVE-2024-23651

GHSA-m3r6-h7wv-7xxv · Severity: high · Ecosystem: go — BuildKit vulnerable to possible race condition with accessing subpaths from cache mounts

OS Trackers for CVE-2024-23651

vendor priority summary link
alpine CVE-2024-23651: 4 source package rows (buildkit, docker, podman, singularity); 19 state rows across 5 repos (3.19-community, 3.20-community, 3.21-community, 3.22-community, edge-community); fixed 19, open 0. https://security.alpinelinux.org/vuln/CVE-2024-23651
gentoo low CVE-2024-23651: 3 GLSA(s) (202407-12, 202407-25, 202409-29), 3 atom(s) (app-containers/buildah, app-containers/docker, app-containers/podman); latest impact low. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2024-23651
redhat medium https://access.redhat.com/security/cve/CVE-2024-23651
suse high https://www.suse.com/security/cve/CVE-2024-23651/
ubuntu medium CVE-2024-23651 medium priority: Ubuntu including 2 source packages (docker.io, docker.io-app), 22 status rows across 11 suites (bionic, focal, jammy, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): released 9, ignored 7, not-affected 4, DNE 2. https://ubuntu.com/security/CVE-2024-23651

Affected software / configurations for CVE-2024-23651

Vendor Product Version Raw CPE
mobyproject buildkit < 0.12.5 cpe:2.3:a:mobyproject:buildkit:*:*:*:*:*:*:*:*

References for CVE-2024-23651

cvelogic Threat Intelligence