High severity · published Jan 31, 2024
CVE-2024-23651
BuildKit is a toolkit for converting source code to build artifacts in an efficient, expressive and repeatable manner
7.4
CVSS
0.9%
EPSS
No
On KEV
Description
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.
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
Attack vector
Network
Complexity
High
Privileges
None
User interaction
None
Confidentiality
High
Integrity
High
Availability
None
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.9% · higher than 60% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
BU
Buildkit · Mobyproject
before 0.12.5 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2024-23651
CVE.org
https://www.cve.org/CVERecord?id=CVE-2024-23651
Patch
https://github.com/moby/buildkit/pull/4604
Patch
https://github.com/moby/buildkit/releases/tag/v0.12.5
Vendor Advisory
https://github.com/moby/buildkit/security/advisories/GHSA-m3r6-h7wv-7xxv
More from Buildkit
9.8
CVE-2026-33747
BuildKit vulnerable to malicious frontend causing file escape outside of storage root
9.8
CVE-2024-23653
BuildKit is a toolkit for converting source code to build artifacts in an efficient, expressive and repeatable manner
9.1
CVE-2024-23652
BuildKit is a toolkit for converting source code to build artifacts in an efficient, expressive and repeatable manner
7.5
CVE-2026-15793
Git source checkout from a bundle file could lead to command injection
7.5
CVE-2026-15792
Possible panic when incorrect parameters sent from frontend
