/

CVE-2026-120306

Severity:

CRITICAL RISK

(9.9)

Build Isolation Escape (CWE-653) in Beta9 Build Workers

CVE-2026-120306

Deferred

Vulnerability type

Category:

Container Isolation Failure

CWE:

CWE-269, CWE-653

Impact:

Tenant-to-worker privilege escalation and worker compromise

Severity:

CRITICAL RISK

(9.9)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Beta9's image build process runs tenant-defined shell commands with Buildah using chroot isolation, which changes the filesystem root without separating key process, network, IPC, or user namespaces. A tenant with a workspace token who submits an image build may therefore gain access to sensitive resources in the privileged worker pod, including its service account token and worker binaries.

Affected context

The issue affects Beta9 worker pods that execute tenant image builds with Buildah in chroot isolation. In this configuration, build steps share important namespaces with the worker and run as uid 0 with CAP_DAC_OVERRIDE. The worker filesystem is accessible through the shared procfs, and may contain credentials, container runtime binaries, and directories mounted into the pod.

Exploit preconditions

  • Attack surface: Tenant image-build workflow using the worker's Buildah process
  • Required access: A valid workspace token with permission to submit an image build
  • Trigger point: Execution of a tenant-defined shell command during a build
  • Why exploitation is possible: Chroot isolation changes the build step's filesystem root but does not provide private PID, network, IPC, and user namespaces. The step runs with elevated privileges in the worker's shared namespace context.

Why this happens

The underlying issue is insufficient compartmentalization (CWE-653): the build environment does not adequately isolate tenant-controlled commands from the worker. Running Buildah with chroot isolation limits filesystem view but does not create the namespace boundaries needed to separate processes and resources. The build step also runs as uid 0 with CAP_DAC_OVERRIDE, reflecting a privilege-management concern (CWE-269) that increases the consequences of the isolation failure.

Potential impact

  • A tenant-controlled build step may access or modify files in the worker container.
  • Worker binaries used to start tenant containers could be exposed to tampering.
  • The worker's Kubernetes service account token could be accessed, potentially enabling actions within the permissions granted to that identity.
  • Host directories mounted into the worker pod may be exposed or modified, depending on their contents and permissions.
  • The worker pod and other workloads it can reach may be compromised.

General mitigation guidance

Defensive designs typically isolate tenant-controlled build commands with private namespaces and a build environment that is separate from the worker's runtime and credentials. Prefer secure-by-default isolation modes that separate process, network, IPC, and user namespaces rather than relying on filesystem-root changes alone.

Reduce the privileges available to build steps, avoid exposing worker credentials and runtime binaries to the build environment, and limit mounted host resources. Treat tenant-provided commands and build arguments as untrusted; pass them only into the isolated build container and validate configuration at trust boundaries.

How teams detect issues like this

Review build execution paths for isolation settings that change only the filesystem root, and check whether tenant-controlled commands share namespaces, credentials, or writable filesystems with the worker. Static analysis and code review can flag Buildah invocations that omit explicit isolation settings, privileged execution, or broad capabilities.

Runtime policies can enforce private namespaces, restrict capabilities and privileged pods, and prevent build containers from mounting worker or host resources. Audit build-worker access to service account tokens and monitor for unexpected changes to container runtime binaries.

Sources

SourceLink
github.comgithub.com/beam-cloud/beta9
github.comgithub.com/beam-cloud/beta9/commit/a28bf12cf0007c792a25d8ed282b4e8bf6f30393
github.comgithub.com/beam-cloud/beta9/pull/1897
github.comgithub.com/beam-cloud/beta9/releases/tag/worker-0.1.756

Frequently asked

questions

A tenant with a workspace token that permits image builds can reach the affected build path by submitting a build. The risk arises when tenant-controlled commands execute without adequate isolation from the worker.

The described path requires a workspace token with permission to submit an image build. Further access to worker or cluster resources depends on the permissions and mounts available to the worker.

Run build steps in a separately isolated environment with private namespaces, minimal privileges, and no unnecessary access to worker credentials or filesystems.

Make strong isolation the default, treat tenant build definitions as untrusted, restrict capabilities and mounts, and use code review and policy checks to verify build-worker boundaries.

Find out what's already
exploitable in your codebase.