PortGate

Advisories · Docker & Containers

CVE-2024-23652 High CVSS 8.6

BuildKit file deletion outside the container

Disclosed 2024 · Last reviewed 2 Dec 2026

A malicious build stage could delete a file on the host during a RUN step.

What happened

Cleanup of a mount followed a path that resolved outside the container.

Affected and patched versions

Affected
BuildKit before 0.12.5.
Patched
BuildKit 0.12.5 and later.

How to check your server

Check

docker buildx version

How to fix and harden

  1. Upgrade BuildKit to 0.12.5 or later with the same update that fixes the related January 2024 BuildKit bugs.

Fix

docker buildx version

Sources

Version ranges and fixes follow the vendor advisory. When a distribution backports a fix, trust its security tracker over the upstream version number. New advisories: RSS · JSON