// For flags

CVE-2024-23651

BuildKit possible race condition with accessing subpaths from cache mounts

Severity Score

7.4
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

Track*
*SSVC
Descriptions

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.

BuildKit es un conjunto de herramientas para convertir código fuente para crear artefactos de manera eficiente, expresiva y repetible. Dos pasos de compilación maliciosos que se ejecutan en paralelo y comparten los mismos montajes de caché con subrutas podrían causar una condición de ejecución que puede hacer que los archivos del sistema host sean accesibles al contenedor de compilación. El problema se solucionó en v0.12.5. Los workarounds incluyen evitar el uso de la interfaz de BuildKit desde una fuente que no es de confianza o crear un Dockerfile que no sea de confianza que contenga montajes de caché con las opciones --mount=type=cache,source=....

Cory Snider discovered that Docker incorrectly handled networking packet encapsulation. An attacker could use this issue to inject internet packets in established connection, possibly causing a denial of service or bypassing firewall protections. This issue only affected Ubuntu 22.04 LTS, Ubuntu 20.04 LTS, and Ubuntu 18.04 LTS. Rory McNamara discovered that Docker incorrectly handled cache in the BuildKit toolkit. An attacker could possibly use this issue to expose sensitive information.

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None
Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None
Attack Vector
Network
Attack Complexity
High
Authentication
None
Confidentiality
Complete
Integrity
Complete
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:Track*
Exploitation
None
Automatable
No
Tech. Impact
Total
* Organization's Worst-case Scenario
Timeline
  • 2024-01-19 CVE Reserved
  • 2024-01-31 CVE Published
  • 2025-05-29 CVE Updated
  • 2025-07-04 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Mobyproject
Search vendor "Mobyproject"
Buildkit
Search vendor "Mobyproject" for product "Buildkit"
< 0.12.5
Search vendor "Mobyproject" for product "Buildkit" and version " < 0.12.5"
-
Affected