RUSTSEC-2026-0482 — Paths or symlinks ending in cap-primitives
Paths or symlinks ending in a slash escape the sandbox
Does your project use an affected cap-primitives version?
Paste your Cargo.lock to check it for RUSTSEC-2026-0482 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
cap-primitives resolves a path inside a sandboxed directory one component at a time and opens the last component with O_NOFOLLOW, so that a symlink there cannot lead out of the directory. When the path ended in /, the resolver added the slash back to the last component before opening it. With a trailing slash the operating system no longer treats that component as the last one, so O_NOFOLLOW does not apply, the symlink is followed, and the resulting file descriptor was returned without further checks.
A symlink inside the sandbox that points outside it, such as escape -> ../outside or a link to /, can therefore be opened as escape/. If the symlink's own target ends in /, the caller's path does not need a trailing slash at all, so removing trailing slashes from untrusted input is not a workaround. The maintainers' advisory reports reads and writes outside the sandbox through open, open_dir, read_dir and canonicalize, and directory creation, removal and renames outside it through create_dir, remove_dir and rename.
This resolver is used on Windows and macOS, on FreeBSD when O_RESOLVE_BENEATH is not available, and on Linux when openat2 is not available (kernels before 5.6, or a seccomp policy that rejects it). cap-std and other crates built on cap-primitives are affected through it. Wasmtime's WASI filesystem support was affected as well; that is covered by RUSTSEC-2026-0269.
The fix stops re-adding the trailing slash and is in 3.4.6 and 4.0.3.
Advisory Timeline
- First published August 20, 2026 (98 days ago).
- Last revised November 11, 2026 — 83 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
cargo update -p cap-primitives --precise 3.4.6
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: crates.io (1).
| Package | Fixed In |
|---|---|
| cap-primitives crates.io · Affected: All versions | 3.4.6, 4.0.3 |
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.0 score means for each attack dimension.
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
References
Frequently Asked Questions
- What is RUSTSEC-2026-0482?
- Paths or symlinks ending in a slash escape the sandbox. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.0/10).
- How do I check if my project is affected by RUSTSEC-2026-0482?
- RUSTSEC-2026-0482 affects cap-primitives. Use GeekWala's free vulnerability scanner to check your dependencies against RUSTSEC-2026-0482 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
Also Known As
Related CVEs
- RUSTSEC-2026-0501CRITICAL
Shamir backup recovery accepts a share at x = 0, so a supplied share can substitute the recovered private key
- CVE-2026-69157CRITICAL
Atomic Server: Unauthenticated `/setup` invite grants write access to the entire Drive
- CVE-2024-51756LOW
cap-std doesn't fully sandbox all the Windows device filenames