CVE-2026-33747: BuildKit vulnerable to malicious frontend causing file escape outside of storage root
Impact When using a custom BuildKit frontend, the frontend can craft an API message that causes files to be written outside of the BuildKit state directory for the execution context.
Patches The issue has been fixed in v0.28.1+
Workarounds Issue requires using an untrusted BuildKit frontend set with #syntax or --build-arg BUILDKITSYNTAX. Using these options with a well-known frontend image like docker/dockerfile is not affected.
Other sources
BuildKit is a toolkit for converting source code to build artifacts in an efficient, expressive and repeatable manner. Prior to version 0.28.1, when using a custom BuildKit frontend, the frontend can craft an API message that causes files to be written outside of the BuildKit state directory for the execution context. The issue has been fixed in v0.28.1. The vulnerability requires using an untrusted BuildKit frontend set with #syntax or --build-arg BUILDKITSYNTAX. Using these options with a well-known frontend image like docker/dockerfile is not affected.
— MITRE
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-33747?
CVE-2026-33747 has been classified as a moderate severity vulnerability due to potential file writes outside the BuildKit state directory.
How do I fix CVE-2026-33747?
You can fix CVE-2026-33747 by upgrading to BuildKit version 0.28.1 or later.
What software is affected by CVE-2026-33747?
CVE-2026-33747 affects BuildKit versions prior to 0.28.1.
What type of vulnerability is CVE-2026-33747?
CVE-2026-33747 is a vulnerability related to improper handling of API messages in custom BuildKit frontends.
Can I use a workaround for CVE-2026-33747?
While a direct workaround is not specified, it is recommended to avoid using untrusted BuildKit frontends until the vulnerability is patched.