BuildKit possible race condition with accessing subpaths from cache mounts (moby buildkit)

CVE-2024-23651
HIGH 8.7

At a glance

Source
NVD
EPSS
EPSS 0.91 % · percentile 60 ()
State
PUBLISHED
Published
Updated
Assigner
GitHub_M
NVD status
Modified

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.

Weaknesses (CWE)

  • CWE-362 — Concurrent Execution using Shared Resource with Improper Synchronization

References

Scores

VersionScoreVectorScored by
CVSS 3.1HIGH 8.7CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:NGitHub_M
CVSS 3.1HIGH 8.7CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:NNVD · security-advisories@github.com (Secondary)
CVSS 3.1HIGH 7.4CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:NNVD · nvd@nist.gov (Primary)

Advisories

European references

CERT-FR advisories

Affected configurations (NVD CPE)

Affected products

ProductVersions
moby · buildkitaffected < 0.12.5

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD