Critical severity · published Jan 31, 2024
CVE-2024-23652
BuildKit is a toolkit for converting source code to build artifacts in an efficient, expressive and repeatable manner
9.1
CVSS
2.5%
EPSS
No
On KEV
Description
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
None
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)2.5% · higher than 84% 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-23652
CVE.org
https://www.cve.org/CVERecord?id=CVE-2024-23652
Patch
https://github.com/moby/buildkit/pull/4603
Patch
https://github.com/moby/buildkit/releases/tag/v0.12.5
Vendor Advisory
https://github.com/moby/buildkit/security/advisories/GHSA-4v98-7qmw-rqr8
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
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
7.5
CVE-2026-15791
LLB file operation can be tricked to remove /tmp directory contents
