CVE-2026-15793 Overview
CVE-2026-15793 is a command injection vulnerability [CWE-88] in BuildKit, the concurrent build toolkit used by Docker and other container platforms. Custom frontends or clients using the raw low-level API can set the git.checkoutbundle=true option when checking out Git sources. A malicious Git source can then trigger a crafted command invocation on the host running the build. The flaw permits attackers who control a Git repository referenced during a build to execute commands outside the intended sandbox.
Critical Impact
A malicious Git source combined with git.checkoutbundle=true enables arbitrary command execution on the BuildKit host, threatening confidentiality, integrity, and availability of the build environment.
Affected Products
- Moby BuildKit (custom frontends or clients using the raw low-level API)
- Container build pipelines that invoke BuildKit with untrusted Git sources
- CI/CD platforms embedding BuildKit as a build backend
Discovery Timeline
- 2026-07-21 - CVE-2026-15793 published to the National Vulnerability Database (NVD)
- 2026-07-21 - Last updated in NVD database
Technical Details for CVE-2026-15793
Vulnerability Analysis
BuildKit resolves Git-based build sources by cloning or fetching a repository specified by the frontend. When a client sets the low-level option git.checkoutbundle=true, BuildKit takes an alternate checkout path that processes bundle-formatted content associated with the Git source. This path does not adequately sanitize source-controlled data before passing it into a command invocation on the host.
An attacker who controls the referenced Git repository can craft repository contents that produce attacker-chosen arguments in the resulting command line. Because the injection occurs during resolution of a build source, it executes before the build sandbox is fully applied, and the resulting commands run in the context of the BuildKit daemon.
The issue is classified under [CWE-88] (Improper Neutralization of Argument Delimiters in a Command). The EPSS probability is 0.396% at the 32.186 percentile as of 2026-07-23, indicating limited but non-zero near-term exploitation likelihood.
Root Cause
The root cause is missing neutralization of argument delimiters when BuildKit constructs a Git command line for the bundle checkout path. Values derived from the untrusted Git source flow into an argument position without a strict allowlist or explicit -- argument terminator, allowing attacker input to be reinterpreted as command flags or additional operands.
Attack Vector
Exploitation requires that a caller of the BuildKit low-level API sets git.checkoutbundle=true and that the referenced Git source is attacker-controlled. Typical scenarios include a developer building from a fork or pull request, a CI runner processing an untrusted branch, or a shared build service accepting user-supplied source URLs. Successful exploitation yields command execution on the host running BuildKit. Full technical detail is published in the GitHub Security Advisory GHSA-hw3h-2gp9-cxpv.
Detection Methods for CVE-2026-15793
Indicators of Compromise
- BuildKit invocations where the raw low-level API sets the option git.checkoutbundle=true against externally-sourced Git URLs.
- Unexpected child processes spawned by the BuildKit daemon during the Git source resolution phase, prior to sandboxed build steps.
- Outbound network connections or file writes originating from the BuildKit process outside of declared build steps.
Detection Strategies
- Audit BuildKit client code and frontend implementations for any use of the git.checkoutbundle attribute and flag callers passing it as true.
- Inspect build logs for Git source URLs referencing untrusted forks, pull requests, or user-supplied repositories combined with bundle checkout behavior.
- Correlate process ancestry on build hosts to identify shell or utility invocations parented by BuildKit outside expected Git binary calls.
Monitoring Recommendations
- Log all BuildKit API requests, capturing frontend attributes and Git source references for retrospective analysis.
- Monitor CI/CD control planes for jobs that build from third-party or unreviewed branches on hosts running vulnerable BuildKit versions.
- Alert on new outbound connections from build hosts to non-registry destinations during Git source resolution.
How to Mitigate CVE-2026-15793
Immediate Actions Required
- Upgrade BuildKit to the fixed release identified in the Moby security advisory.
- Inventory internal frontends and clients that call the BuildKit low-level API and remove any explicit setting of git.checkoutbundle=true.
- Restrict which repositories and branches may be used as build sources in shared CI/CD environments until patching is complete.
Patch Information
The Moby project has published a fix through the GitHub Security Advisory GHSA-hw3h-2gp9-cxpv. Update BuildKit and any downstream distributions, including Docker Engine and CI runners that embed BuildKit, to a release that includes the advisory fix.
Workarounds
- Do not set git.checkoutbundle=true in custom frontends or low-level API clients when handling untrusted Git sources.
- Constrain BuildKit builds to trusted Git repositories via allowlists at the CI/CD layer until upgrades are deployed.
- Run the BuildKit daemon under a least-privilege account and isolate build hosts on segmented networks to limit blast radius if exploited.
# Verify the installed BuildKit version and confirm it matches the fixed release
buildctl --version
docker buildx version
# Grep custom frontend or client code for the vulnerable option
grep -R "git.checkoutbundle" ./ --include="*.go"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

