What happened
The BuildKit maintainers released v0.28.1 with fixes for two high-severity security issues:
- CVE-2026-33747 / GHSA-4c29-8rgm-jvjj: a malicious custom frontend can trigger writes outside the BuildKit state directory.
- CVE-2026-33748 / GHSA-4vrq-3vrq-g6gg: insufficient validation of Git URL
#ref:subdirfragments can allow access to files outside the checked-out repository root.
Both issues affect build boundary trust in CI/CD environments where BuildKit processes untrusted input.
Why this matters
Build systems often run with privileged credentials and access to sensitive files. Boundary-escape bugs in builders can lead to:
- Exposure of secrets mounted on the same filesystem
- Unexpected file writes in build infrastructure
- Supply-chain risk if untrusted build instructions are accepted
If your pipelines use remote contexts, custom frontends, or dynamic syntax configuration, this should be treated as a priority patch.
What defenders should do now
- Upgrade BuildKit to v0.28.1 or newer.
- Restrict use of custom/untrusted frontends (
#syntax/BUILDKIT_SYNTAX) in production CI. - Audit builds that use Git URL fragments with subdir components.
- Harden CI workers so build processes cannot access unrelated sensitive host files.
- Rotate any secrets that may have been exposed by compromised build jobs.
How to check if you’re affected
Use this quick checklist:
Identify your BuildKit version
- Run
buildctl --version(or check the builder image tag in CI). - If version is below 0.28.1, treat as vulnerable.
- Run
Check for risky frontend usage (CVE-2026-33747)
- Search Dockerfiles and build configs for
#syntax=pointing to third-party images. - Search CI for
BUILDKIT_SYNTAXvalues set from untrusted or dynamic input.
- Search Dockerfiles and build configs for
Check for risky Git URL subdir usage (CVE-2026-33748)
- Review builds that pull context from URLs like
https://...git#ref:subdir. - Flag workflows where the repository/ref/subdir can be attacker-controlled.
- Review builds that pull context from URLs like
Look for anomalous filesystem activity during builds
- Investigate unexpected file reads/writes outside normal BuildKit state paths.
Remediate and verify
- Patch to v0.28.1+, rerun affected pipelines, and confirm no suspicious behavior persists.
Sources
- https://github.com/moby/buildkit/releases/tag/v0.28.1
- https://github.com/moby/buildkit/security/advisories/GHSA-4c29-8rgm-jvjj
- https://github.com/moby/buildkit/security/advisories/GHSA-4vrq-3vrq-g6gg
Bottom line
If your org uses BuildKit in CI/CD, patch to 0.28.1+ now and review your frontend/Git-context trust model. These flaws target exactly the boundary assumptions many pipeline designs depend on.
