CVE-2026-15791
Docker vulnerability analysis and mitigation

Overview

CVE-2026-15791 is a path traversal vulnerability in Moby's BuildKit that allows a crafted message in the low-level build API to escape the build container's rootfs and remove the contents of the host's /tmp directory. It was published on July 16, 2026, by Docker maintainer tonistiigi, and affects BuildKit versions 0.10.0 through 0.31.1. The patched version is v0.31.2+. It carries a CVSS v4.0 base score of 1.8 (Low) per NVD, and 3.3 (Low) per ENISA/EUVD (GitHub Advisory).

Technical details

The vulnerability is classified as CWE-22 (Improper Limitation of a Pathname to a Restricted Directory — Path Traversal). BuildKit's low-level LLB (Low-Level Builder) file operation API includes an action for deleting files within the build container's rootfs; due to insufficient path validation, a specially crafted API message can cause this delete operation to traverse outside the container boundary and target the real host /tmp directory. Exploitation requires an attacker to interact with the low-level BuildKit API directly — it cannot be triggered through standard Dockerfile builds and requires use of a custom BuildKit frontend or direct API access (GitHub Advisory).

Impact

Successful exploitation allows an attacker to delete the contents of the host system's /tmp directory, resulting in a limited integrity and availability impact on the host. Confidentiality is not affected, as the vulnerability enables file deletion rather than data exfiltration. The scope is constrained to the /tmp directory and does not provide arbitrary code execution or broader filesystem access, limiting the potential for lateral movement or privilege escalation (GitHub Advisory).

Exploitation steps

  1. Identify target: Locate a BuildKit daemon (version 0.10.0–0.31.1) accessible via its low-level gRPC API, particularly in environments using custom BuildKit frontends rather than standard Dockerfile builds.
  2. Craft malicious LLB message: Construct a crafted LLB (Low-Level Builder) API message that includes a file deletion operation with a path traversal payload (e.g., using ../ sequences) designed to escape the container rootfs boundary and resolve to the host's /tmp directory.
  3. Submit request: Send the crafted message to the BuildKit API endpoint, triggering the path traversal during the file operation handling.
  4. Achieve impact: The BuildKit daemon processes the malicious delete operation against the host /tmp directory, removing its contents and potentially disrupting host processes or services that rely on temporary files (GitHub Advisory).

Indicators of compromise

  • Logs: Unexpected file deletion events targeting /tmp on the BuildKit host, particularly originating from the BuildKit daemon process; BuildKit API logs showing unusual LLB file operation requests with path traversal patterns (e.g., ../ sequences in file paths).
  • File System: Sudden disappearance of files or directories under the host /tmp directory without a corresponding legitimate build or cleanup process.
  • Process: BuildKit daemon (buildkitd) performing file system operations outside expected container rootfs paths, particularly write/delete operations on host /tmp.

Mitigation and workarounds

The vulnerability is fixed in BuildKit v0.31.2+; users should upgrade immediately. As a workaround, the issue only affects the low-level BuildKit API and cannot be reached through standard Dockerfile builds — restricting access to the BuildKit API and avoiding the use of untrusted custom BuildKit frontends effectively mitigates the risk without upgrading. Organizations should audit which services or users have direct access to the BuildKit low-level API (GitHub Advisory).

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-2026-15793HIGH7.3
  • Docker logoDocker
  • docker.io-app
NoNoJul 21, 2026
CVE-2026-15792MEDIUM6
  • Docker logoDocker
  • docker.io
NoNoJul 21, 2026
CVE-2026-42505MEDIUM5.3
  • Go logoGo
  • kubescape-downloader-fips
NoYesJul 08, 2026
CVE-2026-14362MEDIUM4.9
  • Docker logoDocker
  • docker
NoNoJul 08, 2026
CVE-2026-15791LOW1.8
  • Docker logoDocker
  • docker.io
NoNoJul 21, 2026

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