# CVE-2024-23652: BuildKit possible host system access from mount stub cleaner

- Severity: Critical 10.0 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.46%, higher than 84% of CVEs (2026-12-02)
- Published: 2024-01-31T21:57:42.774Z
- Modified: 2026-09-10T03:50:04.779Z
- Also known as: GHSA-4v98-7qmw-rqr8, GO-2024-2494
- Related: CGA-hf9m-rh54-hc2x
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- moby buildkit: < 0.12.5
- github.com/moby/buildkit (Go): before 0.12.5
- mobyproject buildkit: before 0.12.5

## Every score

- GitHub_M: CVSS:3.1 10.0 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:H`
- GitHub: CVSS:3.1 10.0 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:H`
- NVD: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H`

## References

- <https://github.com/moby/buildkit/security/advisories/GHSA-4v98-7qmw-rqr8> (advisory, vendor-advisory, web)
- <https://github.com/moby/buildkit/pull/4603> (fix, patch, vendor-advisory, web)
- <https://github.com/moby/buildkit/releases/tag/v0.12.5> (patch, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-23652> (advisory)
- <https://github.com/moby/buildkit> (package)

## Sources

- CVE List: [CVE-2024-23652](https://www.cve.org/CVERecord?id=CVE-2024-23652), CVE Terms of Use, modified 2025-06-17
- GitHub Advisory Database: [GHSA-4v98-7qmw-rqr8](https://github.com/advisories/GHSA-4v98-7qmw-rqr8), CC-BY-4.0, modified 2026-09-10
- Go Vulnerability Database: [GO-2024-2494](https://pkg.go.dev/vuln/GO-2024-2494), CC-BY-4.0, modified 2026-02-04
- NVD: [CVE-2024-23652](https://nvd.nist.gov/vuln/detail/CVE-2024-23652), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-23652 · Whole record: https://cve.day/CVE-2024-23652.json · Rebuilt by cve.day 2026-11-25T22:58:36.488Z
