9

RUSTSEC-2026-0482: cap-primitives Crates.Io

Published
AliasesGHSA-hp8f-xmx4-4qrg
Published 20-08-2026Last modified 11-11-2026

Vulnerability summary

RUSTSEC-2026-0482 is a critical (CVSS 9.0) vulnerability in cap-primitives Crates.Io.

Priority
Prioritisesevere

Severe, CVSS 9 (OSV · Crates.io); no exploitation reported by the 5 checked sources; EPSS not yet published

Source freshness unavailable

How is this decided?
CVSS score
9.0/10
010
Critical · v3.1 (OSV · Crates.io), selected by version preference
EPSS scoreNot scoredRisk metrics not yet published.
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 0 · Related 2

Timeline

  1. 20-08-2026
    PublishedVulnerability first disclosed.
  2. 11-11-2026
    Last modifiedVulnerability information updated.

Description

Paths or symlinks ending in a slash escape the sandbox 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.

CVSS metrics

1 score · 1 source · 1 version

EPSS trend

No EPSS score has been published for this record yet.

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

No weakness data has been published for this record.

Affected systems

Version check

Known conditions: local access, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.

Crates.Io1 product
  • cap-primitives≥ 4.0.0, < 4.0.3

1 vendor · 1 product

References

3 links