{"id":"CVE-2024-23652","published":"2024-01-31T21:57:42Z","modified":"2025-06-17T21:29:21Z","title":"BuildKit possible host system access from mount stub cleaner","vendor":"moby","product":"buildkit","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":10,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.02464,"percentile":0.84863,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://github.com/moby/buildkit/security/advisories/GHSA-4v98-7qmw-rqr8","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/moby/buildkit/pull/4603","tags":["x_refsource_MISC"]},{"url":"https://github.com/moby/buildkit/releases/tag/v0.12.5","tags":["x_refsource_MISC"]}],"priority":{"score":29.0,"factors":[{"name":"EPSS percentile","points":16.97},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":7.0}]},"exploitSources":{"pocGithub":{"count":2,"skipped":0,"earliest":"2024-03-01","earliestUrl":"https://github.com/abian2/CVE-2024-23652","repos":[{"name":"abian2/CVE-2024-23652","url":"https://github.com/abian2/CVE-2024-23652","stars":2,"created":"2024-03-01"},{"name":"hgyc/CVE-stand","url":"https://github.com/hgyc/CVE-stand","stars":0,"created":"2026-03-19"}]},"first":{"date":"2024-03-01","source":"PoC-in-GitHub","url":"https://github.com/abian2/CVE-2024-23652"},"provenance":"source"},"vendorSlug":"moby","affectedVersions":[{"vendor":"moby","product":"buildkit","versions":["< 0.12.5"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2024-02-01T16:13:41.410911Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"github.com/moby/buildkit","vulnerableRanges":["<0.12.5"],"patched":["0.12.5"],"from":["GHSA-4v98-7qmw-rqr8","GO-2024-2494"],"provenance":"source"}],"summary":{"text":"The BuildKit toolkit (moby/buildkit) contains a path-restriction flaw in its mount stub cleaner, the feature that deletes empty files created for RUN --mount mountpoints, which can be tricked into deleting a file outside the container on the host system. An attacker who can supply a malicious BuildKit frontend or a Dockerfile using RUN --mount can cause the host file to be removed, with no authentication or user interaction required and only network access to the build being needed to trigger it.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T04:03:34Z"},"euvd":{"id":"EUVD-2024-0254","exploited":false,"provenance":"source"}}