Skip to content

[reviewer] Review backlog (security): runs: workspace_path root check is lexical; a symlink under a workspace root escapes workspace_roots #17029

Closed

Description

@hivecommons-hive

Blocked on PR #17025. src/crux/runs/service.go does not exist on v6; this finding tracks code the PR introduces, so there is nothing to ship until it lands. The hive lifts the blocked label when the PR merges or closes.

Filed from an out-of-scope finding in the Hive review of PR #17025.

PR: #17025 (#17025)
Perspective: security
Severity: low (P3)
Finding: runs: workspace_path root check is lexical; a symlink under a workspace root escapes workspace_roots
Evidence: src/crux/runs/service.go:318

func pathUnder(path string, roots []string) bool {

validateWorkspace (service.go:292-299) cleans the path and pathUnder (service.go:318-324) does a string-prefix check against Config.WorkspaceRoots, then os.Stat follows symlinks. No filepath.EvalSymlinks is applied, so /x where x is a symlink to / passes and sandbox.go:141 mounts it rw with --userns=keep-id (sandbox.go:140). A previous untrusted run can plant that symlink in its rw workspace, so a later authenticated request naming the symlinked path mounts arbitrary host paths as the crux serve user. Caller is the authenticated operator so exploitability is low; fix by resolving with filepath.EvalSymlinks before pathUnder. Pre-existing in v5 commit 03094ce; not introduced by this forward-merge.

Fingerprint: 238d6a66ca6e9a62279361fa87b168b75f446b29b95abd8950047aa93c3c894a

filed by Hive review backlog

Activity

  1. added
    blockedWaiting on something outside this repository; not contributor work until a human clears the label
    on Nov 7, 2026
  2. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Nov 7, 2026
  3. removed
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    blockedWaiting on something outside this repository; not contributor work until a human clears the label
    on Nov 7, 2026
  4. hivecommons-hive commented on Nov 8, 2026

    @hivecommons-hive
    ContributorAuthor

    Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

    Unblocked: #17265 (superseding #17025) is no longer open. This issue is actionable again.

  5. hivecommons-hive commented on Nov 8, 2026

    @hivecommons-hive
    ContributorAuthor

    🔓 Claim by @Karibhou released (lease revoked).

    Claim history
    • 2026-11-08 18:45 UTC — claimed by Karibhou (contributor on hive hosted-available-oke-11-placeholder-r05x)
    • 2026-11-08 18:48 UTC — released by Karibhou (contributor; lease revoked)
  6. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Nov 8, 2026
  7. hivecommons-hive commented on Nov 8, 2026

    @hivecommons-hive
    ContributorAuthor

    Unblocked: #17265 merged and the finding's file is still on the base branch. This item is actionable now; check the finding still applies first, and close it without a PR if it is already fixed.

  8. added a commit that references this issue on Nov 8, 2026
    90c102c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/reviewerFiled by the reviewer agenthelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions