/

CVE-2026-120307

Severity:

CRITICAL RISK

(9.9)

Path Traversal (CWE-22) in Beta9 Worker File API Service

CVE-2026-120307

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22, CWE-23, CWE-59

Impact:

Host File System Access

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

A path traversal vulnerability in the Beta9 worker's sandbox file API can let a tenant with a workspace token access files on the hosting worker instead of being confined to their sandbox. With a running sandbox, crafted file-operation paths may enable reading, writing, listing, or deleting worker files, potentially exposing sensitive credentials or affecting other tenants.

Affected context

The issue occurs in Beta9 worker file operations that translate tenant-supplied container paths into host paths. It can arise when path containment relies on checking a mount prefix before joining and cleaning path segments, or when paths are opened against the worker filesystem without confinement against symlink resolution. The affected operations include upload, download, stat, list, find-in-files, replace-in-files, and delete-file.

Exploit preconditions

  • Attack surface: The sandbox file API and workspace synchronization path handling.
  • Required access: A workspace token and a running sandbox.
  • Trigger point: A file operation that resolves a tenant-supplied container path.
  • Why exploitation is possible: Prefix checks may occur before path normalization, and paths may be opened without restricting parent-directory traversal or symlink resolution to the intended container root or mount source.

Why this happens

The underlying bug is insufficient path confinement. Checking whether an unresolved path begins with a mount destination and then joining its remainder can allow parent-directory segments to escape the intended mount after path cleaning, mapping to CWE-22: Improper Limitation of a Pathname to a Restricted Directory and CWE-23: Relative Path Traversal. Opening paths without safely constraining symlink resolution can also map to CWE-59: Improper Link Resolution Before File Access. Together, these patterns can cause tenant-controlled paths to be resolved in the worker's filesystem context.

Potential impact

  • A tenant may read sensitive files on the hosting worker, potentially including service account credentials.
  • An attacker could modify or delete worker files and files belonging to other tenants on the same machine.
  • Access to worker credentials could enable further compromise, depending on their permissions and deployment configuration.
  • In deployments where the worker's service account has broad cluster permissions, exposed credentials could contribute to cluster-level compromise.

General mitigation guidance

Mitigation centers on enforcing filesystem confinement at the point of access, rather than relying on string-prefix checks.

  • Use directory-rooted file APIs, such as os.OpenRoot or equivalent secure primitives, to keep lookups within the intended container root or mount source.
  • Ensure parent-directory traversal and symlink resolution cannot escape the authorized root.
  • Treat tenant-provided paths as untrusted and avoid using them directly to construct host paths.
  • Run workers with least-privilege filesystem and service account permissions; avoid broad cluster roles where they are not required.
  • Prefer isolated storage boundaries and restrict worker access to other tenants' files.

How teams detect issues like this

  • Use static analysis to flag path joins involving untrusted input, especially when preceded by string-prefix checks or followed by file access.
  • Review file operations for canonicalization and symlink-resolution behavior, including paths that do not match a configured mount.
  • Add tests and security policy checks that verify parent-directory traversal and symlink lookups remain confined to the authorized root.
  • Monitor worker file access and investigate unexpected reads, writes, listings, or deletions outside sandbox storage.
  • Automated code review tools can help identify unsafe path construction and file-opening patterns.

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 and a running sandbox may be able to reach the vulnerable file operations.

Direct worker access is not necessarily required; the sandbox file API provides the relevant attack surface. A valid workspace token and a running sandbox are stated prerequisites.

Resolve and open paths using directory-rooted APIs that enforce containment, including during parent-directory and symlink resolution, rather than relying on string-prefix checks.

Treat tenant-controlled paths as untrusted, test containment across traversal and symlink cases, and limit worker filesystem and service account privileges.

Find out what's already
exploitable in your codebase.