{"id":"CVE-2024-23652","aliases":["CVE-2024-23652","GHSA-4v98-7qmw-rqr8","GO-2024-2494"],"related":["CGA-hf9m-rh54-hc2x"],"kind":"vulnerability","state":"published","title":"BuildKit possible host system access from mount stub cleaner","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"en","text":"### 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","format":"markdown","source":"ghsa"},{"lang":"en","text":"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.","format":"markdown","source":"go"},{"lang":"es","text":"BuildKit es un conjunto de herramientas para convertir código fuente para crear artefactos de manera eficiente, expresiva y repetible. Una interfaz de BuildKit maliciosa o un Dockerfile que use RUN --mount podría engañar a la función que elimina archivos vacíos creados para los puntos de montaje para que elimine un archivo fuera del contenedor, del sistema host. El problema se solucionó en v0.12.5. Los workarounds incluyen evitar el uso de interfaces de BuildKit desde una fuente que no sea de confianza o crear un Dockerfile que no sea de confianza que contenga la función RUN --mount.","source":"nvd"}],"published":"2024-01-31T21:57:42.774Z","modified":"2026-09-10T03:50:04.779Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:H","score":10,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:H","score":10,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:H","score":10,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","score":9.1,"rating":"CRITICAL"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"< 0.12.5","status":"affected"}],"vendor":"moby","product":"buildkit","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.12.5"}],"ecosystem":"Go","package":"github.com/moby/buildkit","purl":"pkg:golang/github.com/moby/buildkit","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.12.5"}],"ecosystem":"Go","package":"github.com/moby/buildkit","purl":"pkg:golang/github.com/moby/buildkit","source":"go"},{"ranges":[{"status":"affected","fixed":"0.12.5"}],"vendor":"mobyproject","product":"buildkit","cpe":"cpe:2.3:a:mobyproject:buildkit:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/moby/buildkit/security/advisories/GHSA-4v98-7qmw-rqr8","tags":["advisory","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/moby/buildkit/pull/4603","tags":["fix","patch","vendor-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/moby/buildkit/releases/tag/v0.12.5","tags":["patch","release-notes","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-23652","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/moby/buildkit","tags":["package"],"sources":["ghsa"]}],"credits":["@rmcnamara-snyk"],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2024-02-01T16:13:41.410Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-23652","url":"https://www.cve.org/CVERecord?id=CVE-2024-23652","licence":"CVE Terms of Use","modified":"2025-06-17T21:29:21.838Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4v98-7qmw-rqr8","url":"https://github.com/advisories/GHSA-4v98-7qmw-rqr8","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:04.779Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2024-2494","url":"https://pkg.go.dev/vuln/GO-2024-2494","licence":"CC-BY-4.0","modified":"2026-02-04T03:27:25.287Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-23652","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-23652","licence":"Public domain","modified":"2026-06-17T07:13:18.730Z"}],"updatedAt":"2026-11-25T22:58:36.488Z","epss":{"score":0.02464,"percentile":0.84938,"date":"2026-12-02T12:00:21.000Z"}}