CVE-2026-15791 in BuildKitinfo

Summary

by MITRE • 07/21/2026

A crafted message in the BuildKit low-level build API can be used to remove the contents of the /tmp directory. The action that can normally be used to delete files inside the build container rootfs can escape into the real host temp directory.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 07/21/2026

This vulnerability represents a critical path traversal and privilege escalation issue within the BuildKit container build system that enables attackers to execute arbitrary file deletion operations on the host system. The flaw exists in the low-level build API where maliciously crafted messages can manipulate the build process to target files outside of the designated container filesystem boundaries. When the build system processes these malformed requests, it fails to properly validate or sanitize the paths being referenced, allowing the deletion command intended for the container root filesystem to inadvertently affect the host's temporary directory structure.

The technical implementation of this vulnerability stems from inadequate input validation and path sanitization mechanisms within BuildKit's API processing layer. Specifically, when build commands reference file operations through the low-level API, the system does not sufficiently restrict the scope of file system access to prevent escape conditions that could target host directories. This represents a classic case of insufficient boundary checking where the container isolation mechanism fails to properly contain the operations within the designated build environment. The vulnerability directly maps to CWE-22 Path Traversal and CWE-73 Hardcoded Permissions, as it involves improper handling of file system paths and failure to maintain proper access controls between containerized and host environments.

The operational impact of this vulnerability is severe and potentially devastating for systems utilizing BuildKit for container image building. An attacker who can submit crafted messages to the BuildKit API could systematically delete critical temporary files on the host system, potentially disrupting system services, compromising data integrity, or creating denial-of-service conditions. The escape from container boundaries means that even if the build container itself is isolated, the host's /tmp directory becomes vulnerable to malicious deletion operations. This vulnerability significantly undermines the security guarantees typically provided by containerization technologies and could be exploited in environments where BuildKit is exposed to untrusted inputs or where API access is not properly restricted.

Mitigation strategies should focus on implementing robust input validation at all levels of the BuildKit API processing pipeline, particularly around file system path handling operations. Organizations must ensure that all file operations within build containers are strictly confined to the container's designated filesystem boundaries through proper path normalization and access control enforcement. The solution involves deploying comprehensive path validation mechanisms that prevent any attempt to reference host directories from within container build operations, along with implementing proper API access controls to limit who can submit build requests to the low-level API. Additionally, organizations should consider implementing monitoring and alerting for unusual file deletion patterns in /tmp directories as an additional defensive measure against exploitation attempts.

This vulnerability aligns with several tactics described in the MITRE ATT&CK framework under the Privilege Escalation and Defense Evasion categories, specifically targeting the execution of malicious commands that escape container boundaries. The attack vector demonstrates how container build systems can become attack surfaces when proper isolation controls are not implemented, representing a significant concern for DevOps environments where BuildKit is widely deployed. Organizations should conduct thorough security assessments of their container build infrastructure to identify similar path traversal vulnerabilities in other components and ensure comprehensive protection against host-level file system access violations that could compromise overall system integrity.

Responsible

Docker

Reservation

07/14/2026

Disclosure

07/21/2026

Moderation

accepted

CPE

ready

EPSS

0.00194

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!