Skip to main content

Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

CVE-2024-23651

Severity High
Score 7.4/10

Summary

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. Workarounds include avoiding using BuildKit frontend from an untrusted source or building an untrusted Dockerfile containing cache mounts with "--mount=type=cache,source=..." options. This vulnerability affects github.com/moby/buildkit package versions prior to 0.12.5, and 0.13.x prior to 0.13.0-beta3.

  • HIGH
  • NETWORK
  • HIGH
  • UNCHANGED
  • NONE
  • NONE
  • HIGH
  • NONE

CWE-362 - Race Condition

A race condition occurs in a shared memory program when two threads/processes access the same shared memory data, and at least one thread executes a write operation. This vulnerability manipulates the time to check vs. time to use (TOC/TOU) gap between the threads in the critical section to cause disorientation in the shared data. The impact can vary from compromising the confidentiality of the system to causing the system to crash or to execute arbitrary code.

Advisory Timeline

  • Published