CVE-2024-23652
Docker vulnerability analysis and mitigation

Overview

A vulnerability (CVE-2024-23652) was discovered in Docker Buildkit versions <=v0.12.4. The vulnerability occurs when BuildKit attempts to clean up temporarily added directories after their use during container operations. This security issue was discovered by Snyk and affects the Moby Builder Toolkit (Snyk Blog, GitHub Advisory).

Technical details

The vulnerability manifests when using RUN --mount inside a Dockerfile. If the target directory for the mount is not present in the container filesystem, it will be created for the mount point and removed after use. However, if the parent of this target directory is replaced with a symbolic link during the container lifetime, the cleanup operations during container teardown will traverse this symbolic link. This can lead to the deletion of arbitrary files in the host filesystem, as Buildkit typically runs with root privileges (Snyk Blog).

Impact

When successfully exploited, this vulnerability allows an arbitrary Dockerfile-defined target file inside the host filesystem to be deleted. Since Buildkit generally operates with root privileges, this can result in the deletion of any file in the host filesystem (Snyk Blog).

Mitigation and workarounds

The vulnerability has been patched in Buildkit version v0.12.5. Users are advised to update to this version or later. As a workaround, users should avoid using BuildKit frontend from untrusted sources or building untrusted Dockerfiles containing RUN --mount features. Technologies that bundle Buildkit, such as Docker Engine and Docker Desktop, should also be updated to their respective patched versions (Snyk Blog, GitHub Release).

Additional resources


SourceThis report was generated using AI

Related Docker vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-61729HIGH7.5
  • cAdvisorcAdvisor
  • influx
NoYesDec 02, 2025
CVE-2025-67499MEDIUM6.6
  • DockerDocker
  • containerd-fips
NoYesDec 10, 2025
CVE-2025-61727MEDIUM6.5
  • cAdvisorcAdvisor
  • podman-catatonit
NoYesDec 03, 2025
CVE-2025-58181MEDIUM5.3
  • cAdvisorcAdvisor
  • grype
NoYesNov 19, 2025
CVE-2025-47914MEDIUM5.3
  • cAdvisorcAdvisor
  • grype-db
NoYesNov 19, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management