• Sources: primary
  • Summary: RUSTSEC-2026-0482, rated CVSS 9, says the cap-primitives resolver re-added a trailing slash to the last path component, so O_NOFOLLOW no longer applied and a symlink pointing outside the sandbox was followed. Reads, writes, directory creation, removal and renames outside the sandbox were possible, and stripping trailing slashes from input is not a workaround because the symlink target itself can end in a slash. The resolver is used on Windows, macOS, FreeBSD without O_RESOLVE_BENEATH, and Linux without openat2, and Wasmtime's WASI filesystem support is covered separately by RUSTSEC-2026-0269.
  • Why it matters: Anything that uses cap-std or Wasmtime WASI to confine untrusted code, including agent sandboxes, should move to 3.4.6 or 4.0.3.
  • Background: cap-std is the Bytecode Alliance's capability-based filesystem library for Rust: code gets a handle to a directory and should only reach paths beneath it. On Linux 5.6 and later the kernel's openat2 with RESOLVE_BENEATH enforces that boundary, so the library falls back to resolving each path component in userspace only where that call is missing. Userspace resolution is where symlink and trailing-slash edge cases have repeatedly broken such sandboxes.