{"id":"CVE-2024-23651","aliases":["CVE-2024-23651","GHSA-m3r6-h7wv-7xxv","GO-2024-2493"],"related":["CGA-8ggv-jvp5-fgqx"],"kind":"vulnerability","state":"published","title":"BuildKit possible race condition with accessing subpaths from cache mounts","summary":"BuildKit is a toolkit for converting source code to build artifacts in an efficient, expressive and repeatable manner. Two malicious build steps running in parallel sharing the same cache mounts with subpaths could cause a race condition that can lead to files from the host system being accessible to the build container. The issue has been fixed in v0.12.5. Workarounds include, avoiding using BuildKit frontend from an untrusted source or building an untrusted Dockerfile containing cache mounts with --mount=type=cache,source=... options.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"BuildKit is a toolkit for converting source code to build artifacts in an efficient, expressive and repeatable manner. Two malicious build steps running in parallel sharing the same cache mounts with subpaths could cause a race condition that can lead to files from the host system being accessible to the build container. The issue has been fixed in v0.12.5. Workarounds include, avoiding using BuildKit frontend from an untrusted source or building an untrusted Dockerfile containing cache mounts with --mount=type=cache,source=... options.","source":"cvelist"},{"lang":"en","text":"### Impact\nTwo malicious build steps running in parallel sharing the same cache mounts with subpaths could cause a race condition that can lead to files from the host system being accessible to the build container.\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 cache mounts with `--mount=type=cache,source=...` options.\n\n### References\nhttps://www.openwall.com/lists/oss-security/2019/05/28/1","format":"markdown","source":"ghsa"},{"lang":"en","text":"Two malicious build steps running in parallel sharing the same cache mounts with subpaths could cause a race condition that can lead to files from the host system being accessible to the build container.","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. Dos pasos de compilación maliciosos que se ejecutan en paralelo y comparten los mismos montajes de caché con subrutas podrían causar una condición de ejecución que puede hacer que los archivos del sistema host sean accesibles al contenedor de compilación. El problema se solucionó en v0.12.5. Los workarounds incluyen evitar el uso de la interfaz de BuildKit desde una fuente que no es de confianza o crear un Dockerfile que no sea de confianza que contenga montajes de caché con las opciones --mount=type=cache,source=....","source":"nvd"}],"published":"2024-01-31T21:49:18.041Z","modified":"2026-09-10T03:50:09.440Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N","score":8.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N","score":8.7,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","score":7.4,"rating":"HIGH"}],"cwes":["CWE-362"],"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-m3r6-h7wv-7xxv","tags":["vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/moby/buildkit/pull/4604","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","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-23651","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":"no","technicalImpact":"total","date":"2025-05-08T15:46:26.378Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-23651","url":"https://www.cve.org/CVERecord?id=CVE-2024-23651","licence":"CVE Terms of Use","modified":"2025-05-29T15:03:12.436Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-m3r6-h7wv-7xxv","url":"https://github.com/advisories/GHSA-m3r6-h7wv-7xxv","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:09.440Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2024-2493","url":"https://pkg.go.dev/vuln/GO-2024-2493","licence":"CC-BY-4.0","modified":"2026-02-04T03:54:04.291Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-23651","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-23651","licence":"Public domain","modified":"2026-06-17T07:13:18.610Z"}],"updatedAt":"2026-11-25T22:58:36.487Z","epss":{"score":0.00911,"percentile":0.61061,"date":"2026-12-01T12:00:22.000Z"}}