Skip to main content

RUSTSEC-2026-0482 — Paths or symlinks ending in cap-primitives

CRITICAL

Paths or symlinks ending in a slash escape the sandbox

Published August 20, 2026Updated November 11, 2026Source: OSV

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.

Check my Cargo.lock

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 cap-primitives to 3.4.6 or later
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).

PackageFixed In
cap-primitives crates.io · Affected: All versions3.4.6, 4.0.3

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.0 score means for each attack dimension.

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None

CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N

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

CVSS Score
9.0

Maximum impact if exploited, often with little effort or access required.

Also Known As

GHSA-hp8f-xmx4-4qrg

Related CVEs

  • RUSTSEC-2026-0501
    CRITICAL

    Shamir backup recovery accepts a share at x = 0, so a supplied share can substitute the recovered private key

  • CVE-2026-69157
    CRITICAL

    Atomic Server: Unauthenticated `/setup` invite grants write access to the entire Drive

  • CVE-2024-51756
    LOW

    cap-std doesn't fully sandbox all the Windows device filenames

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my Cargo.lock