cve.bz

CVE-2024-23651 (Leaky Vessels) mobyproject buildkit: Race Condition

7.4 highEPSS 0.9%Fix available

Known as Leaky Vessels

High (7.4) in mobyproject buildkit. EPSS 0.9% estimated probability of exploitation activity in the next 30 days. Fixed in github.com/moby/buildkit 0.12.5.

On this page
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.

Severity

CVSS 3.1

7.4 high
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
EPSS
0.9% (unchanged from 0.9% a week ago; 0.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 61st percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2025-05-08. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization (Race Condition)
OWASP Top 10
A06:2025 Insecure Design
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-23651 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-23651?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-23651?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-23651 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
mobyproject:buildkitbefore 0.12.5

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-m3r6-h7wv-7xxvGogithub.com/moby/buildkit<0.12.50.12.5
GO-2024-2493Gogithub.com/moby/buildkit<0.12.50.12.5

Linux distributions

DistributionReleasePackageFixed inAdvisory
Ubuntu22.04:LTSdocker.io-app27.5.1-0ubuntu3~22.04.2UBUNTU-CVE-2024-23651
Ubuntu24.04:LTSdocker.io-app27.5.1-0ubuntu3~24.04.2UBUNTU-CVE-2024-23651
UbuntuPro:18.04:LTSdocker.io20.10.21-0ubuntu1~18.04.3+esm3UBUNTU-CVE-2024-23651 USN-7474-1
UbuntuPro:20.04:LTSdocker.io20.10.21-0ubuntu1~20.04.6+esm2UBUNTU-CVE-2024-23651 USN-7474-1
UbuntuPro:20.04:LTSdocker.io-app26.1.3-0ubuntu1~20.04.1+esm1UBUNTU-CVE-2024-23651
UbuntuPro:22.04:LTSdocker.io20.10.21-0ubuntu1~22.04.7+esm2UBUNTU-CVE-2024-23651 USN-7474-1
UbuntuPro:24.04:LTSdocker.io20.10.25+dfsg1-2ubuntu1+esm2UBUNTU-CVE-2024-23651 USN-7474-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP2-LTSS, Linux Enterprise High Performance Computing 15 SP3-LTSS and 15 moredocker24.0.7_ce-150000.193.1SUSE-SU-2024:0586-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP2-LTSS, Linux Enterprise High Performance Computing 15 SP3-LTSS and 15 moredocker25.0.6_ce-150000.207.1SUSE-SU-2024:3120-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise High Performance Computing 15 SP4-ESPOS and 11 moredocker-stable24.0.9_ce-150000.1.25.1SUSE-SU-2025:03545-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise Server 15 SP3-LTSS and 1 morebuildah1.35.4-150300.8.25.1SUSE-SU-2024:3120-1
SUSELinux Enterprise Module for Containers 12docker24.0.7_ce-98.106.1SUSE-SU-2024:0587-1
SUSELinux Enterprise Module for Containers 12docker25.0.5_ce-98.112.1SUSE-SU-2024:1469-1
SUSELinux Enterprise Module for Containers 15 SP4docker24.0.7_ce-150000.193.1SUSE-SU-2024:0586-2
SUSELinux Enterprise Server 12 SP5-LTSS, Linux Enterprise Server LTSS Extended Security 12 SP5docker-stable24.0.9_ce-1.20.1SUSE-SU-2025:03540-1
SUSELinux Micro 6.0buildkit0.12.5-1.1SUSE-SU-2025:20107-1
SUSELinux Micro 6.0docker25.0.6_ce-1.1SUSE-SU-2025:20056-1
openSUSELeap 15.5, Leap 15.6, Leap Micro 5.5docker25.0.6_ce-150000.207.1SUSE-SU-2024:3120-1
openSUSELeap 15.5, Leap Micro 5.3, Leap Micro 5.4docker24.0.7_ce-150000.193.1SUSE-SU-2024:0586-1
openSUSELeap 15.6docker-stable24.0.9_ce-150000.1.25.1SUSE-SU-2025:03545-1
openSUSETumbleweedbuildkit0.12.5-1.1openSUSE-SU-2024:13651-1
openSUSETumbleweeddocker24.0.7_ce-3.1openSUSE-SU-2024:13689-1
openSUSETumbleweeddocker-stable24.0.9_ce-15.1openSUSE-SU-2025:15589-1
openSUSETumbleweedsingularity-ce4.1.3-1.1openSUSE-SU-2024:14059-1
Alpinev3.18, v3.19, v3.20 and 4 moredocker25.0.2-r0ALPINE-CVE-2024-23651
Alpinev3.19, v3.20, v3.21 and 3 morebuildkit0.12.5-r0ALPINE-CVE-2024-23651
Alpinev3.19, v3.20, v3.21 and 3 moresingularity4.1.1-r0ALPINE-CVE-2024-23651
Alpinev3.20, v3.21, v3.22 and 2 morepodman4.9.2-r0ALPINE-CVE-2024-23651
Azure Linux2moby-engine20.10.27-4AZL-34085
Azure Linux3moby-engine25.0.3-1AZL-35005
Alpaquita23podman5.2.5-r0BELL-CVE-2024-23651
Alpaquitastreamdocker25.0.2-r0BELL-CVE-2024-23651
Alpaquitastreampodman4.9.3-r0BELL-CVE-2024-23651

From the distributions' data via OSV.dev: Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Ubuntu · SUSE · openSUSE · Alpine · Alpaquita.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This vulnerability can only be exploited when two containers are being built in parallel within the same cache directory. A concurrent running build that has the target cache directory mounted, needs to replace the target directory with a symbolic link between the time it is checked and actually used. As there is an unpredictable race condition, this issue is difficult to exploit. Therefore it is rated as having Moderate severity.

Red Hat's mitigation

Do not use BuildKit frontends or Dockerfiles from untrusted sources.

ProductPackageStateAdvisory
OpenShift Developer Tools and ServicesodoNot affected
OpenShift Serverlessopenshift-serverless-1/client-kn-rhel8Not affected
OpenShift Serverlessopenshift-serverless-clientsNot affected
OpenShift Service Mesh 2openshift-service-mesh/istio-cni-rhel8Not affected
Red Hat Ansible Automation Platform 1.2openshift-clientsNot affected
Red Hat Enterprise Linux 8container-tools:rhel8/buildahNot affected
Red Hat Enterprise Linux 8container-tools:rhel8/podmanNot affected
Red Hat Enterprise Linux 9buildahNot affected
Red Hat Enterprise Linux 9podmanNot affected
Red Hat OpenShift Container Platform 4openshift-clientsNot affected
Red Hat OpenShift Dev Spacesdevspaces/traefik-rhel8Affected
Red Hat Quay 3quay/quay-builder-rhel8Affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-23651.

Attack patterns (CAPEC)

  • CAPEC-26 Leveraging Race Conditions Likelihood: High · Severity: High
  • CAPEC-29 Leveraging Time-of-Check and Time-of-Use (TOCTOU) Race Conditions Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON