Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-93315 Overview
CVE-2026-93315 affects Moby BuildKit when proxy networking with Certificate Authority (CA) injection is enabled. A build process can modify its CA bundle before cleanup executes, creating a time-of-check to time-of-use (TOCTOU) race condition classified as [CWE-367]. The flaw may cause cleanup routines to block indefinitely, operate outside the build root filesystem, or fail silently without failing the build. BuildKit v0.33.1 contains the fix. The issue requires local access and low privileges, limiting remote exploitation but affecting shared build infrastructure such as continuous integration (CI) runners.
Critical Impact
A malicious build can manipulate the injected CA bundle to escape the build rootfs during cleanup or stall cleanup operations, potentially impacting host integrity and availability on shared BuildKit hosts.
Affected Products
- Moby BuildKit versions prior to v0.33.1
- Build environments with proxy networking and CA injection enabled
- CI/CD platforms embedding BuildKit for container image builds
Discovery Timeline
- 2026-10-05 - CVE-2026-93315 published to NVD
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-93315
Vulnerability Analysis
BuildKit supports injecting CA certificates into build containers when proxy networking is configured. The injected CA bundle resides within the build's filesystem. After the build completes, BuildKit cleanup routines remove the injected material and dismantle the build rootfs. The vulnerability exists because the build process can alter the CA bundle between the time cleanup references it and the time cleanup acts on it.
This is a classic time-of-check to time-of-use race condition. The cleanup logic trusts that the CA bundle path and contents remain unchanged. A build with low local privileges can replace the file, substitute a symbolic link, or restructure the directory to point outside the build rootfs. Cleanup then operates on attacker-controlled paths.
Three outcomes are possible. Cleanup may block, holding BuildKit resources and causing denial of service on the host daemon. Cleanup may operate outside the intended rootfs, modifying or removing files that belong to the host or other builds. Cleanup may fail silently without marking the build as failed, leaving residual state on the system.
Root Cause
The root cause is missing atomicity between validation and action in the cleanup path. BuildKit does not pin the CA bundle inode or use filesystem operations that resolve paths relative to a locked directory handle. This allows a concurrent writer inside the build to swap the target.
Attack Vector
An attacker needs the ability to submit builds to a BuildKit instance where proxy networking with CA injection is enabled. During the build, the attacker modifies the CA bundle file or its parent directory structure. When cleanup runs, it follows the manipulated path. The attack vector is local and requires low privileges on the BuildKit frontend.
See the GitHub Security Advisory GHSA-2f5p-x9ph-g97x for maintainer-provided technical detail.
Detection Methods for CVE-2026-93315
Indicators of Compromise
- BuildKit cleanup operations that hang or exceed expected duration on shared build hosts.
- Unexpected modifications to files outside the build rootfs, correlated in time with BuildKit cleanup phases.
- BuildKit log entries indicating cleanup errors or warnings without a corresponding build failure status.
Detection Strategies
- Audit BuildKit daemon logs for cleanup anomalies, including partial removals and timeout errors in sessions that used proxy CA injection.
- Monitor filesystem events on BuildKit host paths outside the build root directory for writes originating from the buildkitd process.
- Compare BuildKit versions deployed across CI runners against the fixed release v0.33.1 to identify exposed hosts.
Monitoring Recommendations
- Enable auditd or eBPF-based file integrity monitoring on BuildKit host directories to catch out-of-rootfs modifications during cleanup.
- Track BuildKit daemon resource usage; sustained handles on build rootfs mounts after build completion indicate stalled cleanup.
- Centralize BuildKit logs in a SIEM and alert on cleanup error patterns correlated with CA injection sessions.
How to Mitigate CVE-2026-93315
Immediate Actions Required
- Upgrade BuildKit to v0.33.1 or later on all build hosts and CI runners.
- Inventory build pipelines that enable proxy networking with CA injection and prioritize them for patching.
- Restrict submission of builds to trusted users on BuildKit instances that cannot be upgraded immediately.
Patch Information
The fix is included in Moby BuildKit v0.33.1. Review the BuildKit v0.33.1 release notes for upgrade guidance and the complete list of changes. Container platforms that embed BuildKit should rebuild against the patched version.
Workarounds
- Disable proxy networking with CA injection in BuildKit configurations until the upgrade is deployed.
- Isolate BuildKit instances on dedicated hosts to limit blast radius if cleanup escapes the build rootfs.
- Enforce per-build ephemeral hosts or containers so that stalled or escaped cleanup does not persist across builds.
# Verify installed BuildKit version and upgrade
buildctl --version
# Upgrade container image reference used in CI
# From:
# image: moby/buildkit:v0.33.0
# To:
# image: moby/buildkit:v0.33.1
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

