{"id":"CVE-2024-23651","published":"2024-01-31T21:49:18Z","modified":"2025-05-29T15:03:12Z","title":"BuildKit possible race condition with accessing subpaths from cache mounts","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. 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.\n","provenance":"source","from":"CVE.org"},"cvss":{"score":8.7,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00709,"percentile":0.49181,"provenance":"source"},"cwes":[{"id":"CWE-362","name":"Concurrent Execution using Shared Resource with Improper Synchronization"}],"references":[{"url":"https://github.com/moby/buildkit/security/advisories/GHSA-m3r6-h7wv-7xxv","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/moby/buildkit/pull/4604","tags":["x_refsource_MISC"]},{"url":"https://github.com/moby/buildkit/releases/tag/v0.12.5","tags":["x_refsource_MISC"]}],"priority":{"score":15.9,"factors":[{"name":"EPSS percentile","points":9.84},{"name":"CVSS severity","points":6.09}]},"vendorSlug":"moby","affectedVersions":[{"vendor":"moby","product":"buildkit","versions":["< 0.12.5"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2025-05-08T15:46:26.378151Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"github.com/moby/buildkit","vulnerableRanges":["<0.12.5"],"patched":["0.12.5"],"from":["GHSA-m3r6-h7wv-7xxv","GO-2024-2493"],"provenance":"source"}],"summary":{"text":"The flaw is a race condition in BuildKit, the build toolkit used to turn source code into build artifacts, affecting how it handles subpaths in cache mounts. Two malicious build steps running in parallel that share the same cache mounts with subpaths can cause files from the host system to become accessible to the build container. The attack needs network access and no authentication, and it depends on a malicious build step running alongside another in a shared cache mount, which is the case when building an untrusted Dockerfile or using a BuildKit frontend from an untrusted source.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:34:32Z"},"euvd":{"id":"EUVD-2024-0383","exploited":false,"provenance":"source"}}