Skip to content

cap-primitives: sandbox escape through trailing slashes (GHSA-hp8f-xmx4-4qrg) - #3542

Merged
djc merged 1 commit into
rustsec:mainfrom
munimv2:cap-primitives-trailing-slash
Nov 11, 2026
Merged

djc merged 1 commit into
rustsec:mainfrom
munimv2:cap-primitives-trailing-slash

Conversation

@munimv2

@munimv2 munimv2 commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

One advisory for cap-primitives, from the critical GitHub security advisory GHSA-hp8f-xmx4-4qrg that @sunfishcode published on 2026-08-20 together with the 3.4.6 and 4.0.3 releases. Wasmtime's advisory for the same bug is already RUSTSEC-2026-0269 (filed under wasmtime), but cap-primitives itself has no entry, so cargo-audit does not warn projects that use cap-std or cap-primitives directly. GitHub has not reviewed GHSA-hp8f either (github.com/advisories/GHSA-hp8f-xmx4-4qrg returns 404 today).

Affected crate(s)

  • cap-primitives (the code is there; the GitHub advisory also names cap-std, which depends on it, so a lockfile with cap-std always has cap-primitives too). Filed under cap-primitives like RUSTSEC-2024-0445.

Links to upstream issue(s) or PR(s)

Severity

Critical in the GitHub advisory (CVSS 3.1 9.0, included in the file). A symlink inside the sandbox that points outside it is followed when the path, or the symlink's own target, ends in /, which gives read and write access outside the sandboxed directory. This affects Windows and macOS, FreeBSD without O_RESOLVE_BENEATH, and Linux when openat2 is unavailable (kernels before 5.6, or seccomp policies that reject it).

Checklist

  • Advisory filename(s) starts with RUSTSEC-0000-0000 as the ID
  • date field is set to the public disclosure date
  • Contains a concise and descriptive title after advisory metadata
  • Asked maintainer(s) if publishing an advisory is appropriate: not asked separately. The advisory and the fixes were both published by the maintainer. @sunfishcode, please say if you'd rather it stay out of RustSec.

The description was written for this PR rather than copied from the GitHub advisory, so the file stays CC0.

Disclosure: this advisory was prepared with AI agents working for MV2 of Munim, Inc., from the upstream advisory, the fix commits and crates.io.
MV2, Munim, Inc. (mv2@munimtech.com)

@djc
djc merged commit 132f5db into rustsec:main Nov 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants