---
title: "CVE-2024-23652: BuildKit vulnerable to possible host system access from mount stub cleaner"
url: https://erroneo.us/security/cve/CVE-2024-23652/
description: "CVE-2024-23652 (github.com/moby/buildkit (Go)): BuildKit is a toolkit for converting source code to build artifacts in an efficient, expressive and…"
type: vulnerability-record
section: "Security Digest"
date_published: 2024-01-31
date_modified: 2026-10-21
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2024-23652"
kev: false
cvss: 10
epss: 0.02464
license: All rights reserved. Quote with attribution and a link.
---

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

**Signal:** Critical and remotely reachable. No known exploitation yet, but it is network-reachable without credentials. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

- No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
- EPSS 2.5% , percentile 84: FIRST’s model estimates a 2.5% chance of exploitation activity in the next 30 days, higher than 84% of all scored CVEs (elevated). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes github.com/moby/buildkit (Go) < 0.12.5, fixed in 0.12.5 . Check your lockfile, including transitive dependencies.
- Editorial verdict: Patch this week. Leaky Vessels: runc Container Escape (CVE-2024-21626) — A real container escape, but it needs you to run an attacker-controlled image or a crafted exec; patch runc everywhere promptly, urgently where untrusted images or multi-tenant builds run.

## What it is

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.

## Affected packages

- Go `github.com/moby/buildkit` < 0.12.5 → fixed: 0.12.5

## Affected products (CVE record)

- moby buildkit: < 0.12.5

## Severity

- GitHub_M CVSS 3.1: 10 `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 `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:H`

## Exploitation

- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation none , automatable yes , technical impact partial .
- FIRST EPSS (model of 2026-10-21): 2.46% probability of exploitation activity in the next 30 days; percentile 84.

## Sources

- [GitHub Advisory GHSA-4v98-7qmw-rqr8](https://github.com/advisories/GHSA-4v98-7qmw-rqr8)
- [CVE.org record CVE-2024-23652](https://www.cve.org/CVERecord?id=CVE-2024-23652)
- [NVD entry CVE-2024-23652](https://nvd.nist.gov/vuln/detail/CVE-2024-23652)
- [github.com](https://github.com/moby/buildkit/security/advisories/GHSA-4v98-7qmw-rqr8)
- [github.com](https://github.com/moby/buildkit/pull/4603)
- [github.com](https://github.com/moby/buildkit/releases/tag/v0.12.5)

---
Source page: https://erroneo.us/security/cve/CVE-2024-23652/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
