Aug 20, 2026·4 min read·4 visits
Moby BuildKit before v0.31.1 fails to validate protobuf SecurityMode enums, allowing invalid values to disable Seccomp and AppArmor security profiles on execution containers.
A detailed technical analysis of CVE-2026-61711, an input validation flaw in Moby BuildKit prior to version 0.31.1. The flaw allows unauthorized or custom frontends to construct build execution environments where Seccomp and AppArmor configurations are completely disabled by supplying an invalid protobuf enum index, resulting in an elevated kernel-level attack surface inside the build sandbox.
Moby BuildKit is a highly efficient toolkit designed to convert source code into build artifacts, acting as the backend framework for modern container development suites.
Prior to version 0.31.1, BuildKit contained a logical input validation flaw when deserializing structured gRPC message payloads that carry client-supplied execution directives.
Specifically, the integer value representing the SecurityMode parameter was parsed and accepted from the payload without validation against the known, approved set of Protocol Buffer (protobuf) enum constants.
This behavior exposes a local and network-adjacent attack surface where an execution instance can bypass default Linux security profiles without triggering the security authorization flags.
The root cause of the vulnerability resides in how BuildKit processes protobuf-defined integer enums during the construction of Open Container Initiative (OCI) runtime specifications.
Inside the module executor/oci/spec_linux.go, the function generateSecurityOpts employs a standard Go switch statement to evaluate the security requirements of a build instruction based on the parsed SecurityMode parameter.
The switch statement explicitly checks for SecurityMode_INSECURE (1) and SecurityMode_SANDBOX (0) but lacks a default handler or generic validation logic to capture integers outside of this range.
When a client submits a crafted request specifying an unmapped integer such as 2, the switch matches neither case, allowing execution flow to slide to the end of the block.
The routine then executes a default fallback statement return nil, nil, which hands back a null array of options alongside a null error state, causing the executor to proceed with no configuration profiles.
The vulnerable path in the specification generator ignored non-conforming parameters, resulting in a silent failure to apply safety options:
// Vulnerable block in executor/oci/spec_linux.go
func generateSecurityOpts(mode pb.SecurityMode, apparmorProfile string, selinuxB bool) (opts []oci.SpecOpts, _ error) {
if selinuxB && !selinux.GetEnabled() {
return nil, errors.New("selinux is not available")
}
switch mode {
case pb.SecurityMode_INSECURE:
return []oci.SpecOpts{
security.WithInsecureSpec(),
oci.WithWriteableCgroupfs,
}, nil
case pb.SecurityMode_SANDBOX:
// Standard sandbox configuration goes here
if cdseccomp.IsEnabled() {
opts = append(opts, withDefaultProfile())
}
return opts, nil
}
return nil, nil // Silent fall-through on unvalidated integers
}To address this error, the developers created an input validator helper inside solver/pb/securitymode.go:
package pb
import "github.com/pkg/errors"
// Patched input validator helper
func ValidateSecurityMode(mode SecurityMode) error {
switch mode {
case SecurityMode_SANDBOX, SecurityMode_INSECURE:
return nil
default:
return errors.Errorf("invalid security mode %d", mode)
}
}This validator function is now actively called at the entry point of the container initialization code, returning a termination error if any anomalous value is detected.
An attacker begins by preparing low-level builder (LLB) instructions containing a manual modification to the pb.Op structure, setting the SecurityMode property to 2.
The attacker requires permission to issue build instructions or solve requests to an open BuildKit gRPC TCP socket or local UNIX socket.
When BuildKit processes this gRPC request, it skips verification checks for administrative permissions because the value does not register as SecurityMode_INSECURE.
Consequently, the build container is deployed with no active Seccomp profile or AppArmor rules, allowing the container processes to issue raw system calls that would otherwise be blocked.
The successful exploitation of this vulnerability yields a build environment with a degraded security configuration.
While namespace isolation and standard administrative capabilities inside the container remain restricted, the complete removal of Seccomp system call profiling opens up kernel vulnerabilities.
This exposes the host kernel to validation errors, device drivers probing, and other system calls that increase the risk of an escape to the host node.
The CVSS v4.0 rating is calculated as 5.3 due to the low complexity of the request but the reliance on pre-existing gRPC channel authorization.
The recommended approach to address the flaw is updating BuildKit installations to the verified release version 0.31.1.
In environments where updates cannot be deployed immediately, administrators must enforce local loopback binding or strict firewall controls on BuildKit gRPC TCP endpoints.
> [!NOTE] > Restricting standard access to socket-level communication paths prevents unauthenticated network-adjacent clients from transmitting arbitrary execution commands.
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N| Product | Affected Versions | Fixed Version |
|---|---|---|
BuildKit Moby | < 0.31.1 | 0.31.1 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-20 |
| Attack Vector | Network (AV:N) |
| CVSS Score | 5.3 |
| EPSS Score | N/A |
| Impact | Low (Confidentiality, Integrity, Availability) |
| Exploit Status | None |
| KEV Status | Not Listed |
Improper Input Validation
moby/buildkit is susceptible to a denial-of-service vulnerability prior to version 0.31.1. When BuildKit processes user or group directives from untrusted build contexts or base images, it reads configuration databases such as /etc/passwd and /etc/group directly into memory without enforcing boundaries. An attacker can exploit this behavior by engineering malicious files that trigger host memory exhaustion or block daemon threads indefinitely.
CVE-2026-59992 is a critical broken access control vulnerability in the first-party production media adapters of Tina CMS, including next-tinacms-s3, next-tinacms-dos, next-tinacms-azure, and next-tinacms-cloudinary. The issue allows authenticated editors to escape the configured mediaRoot directory containment, facilitating unauthorized file uploads, modifications, and deletions across the entire storage bucket or container.
A Cross-Site Request Forgery (CSRF) vulnerability in the local development server of @tinacms/cli allowed malicious cross-origin pages to send state-changing HTTP requests. This issue permitted attackers to write arbitrary files into a developer's project directory or manipulate search and GraphQL indices without authorization.
A high-severity path traversal vulnerability exists in the @logto/tunnel npm package (part of the Logto repository) prior to version 0.3.9. Remote unauthenticated attackers can exploit this vulnerability to read arbitrary local files by sending crafted HTTP requests with directory traversal sequences when the static file proxy is active.
A critical stored Cross-Site Scripting (XSS) vulnerability was identified in Froxlor server administration software panel before version 2.3.8. Authenticated customers with DNS editor privileges can inject malicious JavaScript into DNS TXT records. Because the application processes these values via a raw formatting callback without context-aware HTML entity encoding, the payload executes in the security context of administrative users who view the affected domain's DNS zones.
An authenticated administrator with privileges to manage admin accounts (such as change_serversettings) can execute arbitrary SQL commands via a second-order SQL injection vulnerability. The flaw resides in Froxlor's administrative API endpoints, specifically during the handling of IP address mapping parameters which are stored as serialized arrays and later interpolated without sanitization into active database queries. This vulnerability allows high-privileged administrative attackers to compromise the database. By injecting a payload into administrative profile metadata, an attacker can extract sensitive credentials, manipulate backend settings, or potentially disrupt database integrity. The vulnerability affects all versions of Froxlor prior to 2.3.8.