Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: GSA_kwCzR0hTQS1tM3I2LWg3d3YtN3h4ds4AA4-s
BuildKit vulnerable to possible race condition with accessing subpaths from cache mounts
Impact
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.
Patches
The issue has been fixed in v0.12.5
Workarounds
Avoid using BuildKit frontend from an untrusted source or building an untrusted Dockerfile containing cache mounts with --mount=type=cache,source=...
options.
References
https://www.openwall.com/lists/oss-security/2019/05/28/1
Permalink: https://github.com/advisories/GHSA-m3r6-h7wv-7xxvJSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1tM3I2LWg3d3YtN3h4ds4AA4-s
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: 3 months ago
Updated: 3 months ago
CVSS Score: 8.7
CVSS vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N
Identifiers: GHSA-m3r6-h7wv-7xxv, CVE-2024-23651
References:
- https://github.com/moby/buildkit/security/advisories/GHSA-m3r6-h7wv-7xxv
- https://github.com/moby/buildkit/pull/4604
- https://nvd.nist.gov/vuln/detail/CVE-2024-23651
- https://github.com/moby/buildkit/releases/tag/v0.12.5
- https://github.com/advisories/GHSA-m3r6-h7wv-7xxv
Blast Radius: 26.7
Affected Packages
go:github.com/moby/buildkit
Dependent packages: 896Dependent repositories: 1,163
Downloads:
Affected Version Ranges: < 0.12.5
Fixed in: 0.12.5
All affected versions: 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.4.0, 0.5.0, 0.5.1, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.7.0, 0.7.1, 0.7.2, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.9.0, 0.9.1, 0.9.2, 0.9.3, 0.10.0, 0.10.1, 0.10.2, 0.10.3, 0.10.4, 0.10.5, 0.10.6, 0.11.0, 0.11.1, 0.11.2, 0.11.3, 0.11.4, 0.11.5, 0.11.6, 0.12.0, 0.12.1, 0.12.2, 0.12.3, 0.12.4
All unaffected versions: 0.12.5