{"id":"GHSA-4v98-7qmw-rqr8","summary":"BuildKit vulnerable to possible host system access from mount stub cleaner","details":"### Impact\nA 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.\n\n### Patches\nThe issue has been fixed in v0.12.5\n\n### Workarounds\nAvoid using BuildKit frontend from an untrusted source or building an untrusted Dockerfile containing `RUN --mount` feature.\n\n### References\n\n","aliases":["CVE-2024-23652","GO-2024-2494"],"modified":"2026-07-17T21:12:45.249355565Z","published":"2024-01-31T22:43:26Z","database_specific":{"github_reviewed_at":"2024-01-31T22:43:26Z","nvd_published_at":"2024-01-31T22:15:54Z","cwe_ids":["CWE-22"],"severity":"CRITICAL","github_reviewed":true},"references":[{"type":"WEB","url":"https://github.com/moby/buildkit/security/advisories/GHSA-4v98-7qmw-rqr8"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-23652"},{"type":"WEB","url":"https://github.com/moby/buildkit/pull/4603"},{"type":"PACKAGE","url":"https://github.com/moby/buildkit"},{"type":"WEB","url":"https://github.com/moby/buildkit/releases/tag/v0.12.5"}],"affected":[{"package":{"name":"github.com/moby/buildkit","ecosystem":"Go","purl":"pkg:golang/github.com/moby/buildkit"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.12.5"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/01/GHSA-4v98-7qmw-rqr8/GHSA-4v98-7qmw-rqr8.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:H"}]}