Skip to main content
CVE-2024-23651VulnerabilityPublished Updated

CVE-2024-23651: moby buildkit · Race Condition

Affects moby buildkitSource CVE Database V5

0

Not known to be exploited · CVSS 8.7 High : upgrade to 0.12.5 soon.

Data as of 25 Oct 2026, 19:02 UTC

CVSS 3.1 base score
8.7High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.9% chance of exploitation in 30 days – higher than 59% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 0.12.5
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 31 Jan 2024

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-25.

What to do

Upgrade moby/buildkit to 0.12.5.

Affected software

ProductAffectedFixed in
GitHubmoby/buildkitpkg:github/moby/buildkitOther threatsAffected
  • <0.12.5
Fixed in
  • 0.12.5

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

1. Upgrade BuildKit to version 0.12.5 or later immediately to apply the official fix. 2. Implement strict controls on build inputs: only use trusted BuildKit frontends and avoid building Dockerfiles from untrusted or external sources, especially those that use cache mounts with --mount=type=cache,source=... options. 3. Enforce isolation policies in CI/CD pipelines to prevent concurrent builds from sharing cache mounts or other resources that could lead to race conditions. 4. Audit and monitor build logs and file system accesses during builds to detect anomalous behavior indicative of exploitation attempts. 5. Use container security tools to scan build environments for misconfigurations and enforce least privilege principles on build agents. 6. Educate developers and DevOps teams about the risks of race conditions in build processes and the importance of secure build configurations. 7. Consider implementing ephemeral build environments that are destroyed after each build to limit the persistence of any unauthorized access.

Description

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.

References

Community reviews

Loading reviews…