CVE-2026-61711: BuildKit: Custom frontend could bypass Seccomp/AppArmor
Impact A custom frontend could send a crafted build request that disabled Seccomp and AppArmor protections for the build container, even if the user did not explicitly allow the security.insecure entitlement. Other security measures, like Linux capabilities were still applied to these containers.
Patches Problem has been fixed in versions v0.31.1+
Workarounds Only use BuildKit frontends from trusted providers.
Other sources
BuildKit is a toolkit for converting source code to build artifacts in an efficient, expressive and repeatable manner. Prior to 0.31.1, a custom frontend could place an invalid SecurityMode value in a crafted build request, and executor/oci/speclinux.go treated the unsupported value as a non-sandbox mode without requiring the security.insecure entitlement. This disabled Seccomp and AppArmor protections for the build container even though Linux capabilities remained restricted. This issue is fixed in version 0.31.1.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
go/github.com/moby/buildkitto a version that resolves this vulnerability.Fixed in 0.31.1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 0.31.1 - Compensating control
Only use BuildKit frontends from trusted providers.
Event History
Frequently Asked Questions
What must an attacker control to exploit this issue?
They need to use a custom frontend that can submit a crafted build request containing an invalid SecurityMode value. The bypass does not require the security.insecure entitlement.
Which protections are lost if exploitation succeeds?
Seccomp and AppArmor protections for the build container can be disabled. Linux capabilities remain restricted.
What is the remediation?
Upgrade Moby BuildKit to version 0.31.1, which fixes the handling of unsupported SecurityMode values.