{"schemaVersion":4,"id":"RUSTSEC-2026-0482","aliases":["GHSA-hp8f-xmx4-4qrg"],"status":"published","duplicateOf":null,"title":null,"description":"Paths or symlinks ending in a slash escape the sandbox\n\ncap-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.\n\nA 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`.\n\nThis 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.\n\nThe fix stops re-adding the trailing slash and is in 3.4.6 and 4.0.3.","dates":{"published":"2026-08-20T12:00:00.000Z","modified":"2026-11-11T08:45:02.459Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":9,"severity":"critical","version":"3.1","versionLabel":"v3.1","source":"OSV · Crates.io","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","computed":true,"selection":"version-preference"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"OSV · Crates.io","score":9,"severity":"critical","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","exploitability":6.4,"impact":9.7,"computed":true}]},"epss":{"probability":null,"percentile":null,"severity":"unknown","asOf":null,"change":{"pp":null,"baselineDate":null,"baselineScore":null},"history":[],"last30":[]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[],"affected":[{"vendor":"Crates.Io","product":"cap-primitives","name":"cap-primitives","label":"cap-primitives","ecosystem":"Crates.Io","cpePart":null,"purl":"pkg:cargo/cap-primitives","purlType":"cargo","versions":[{"text":"≥ 4.0.0, < 4.0.3","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"4.0.0","startInclusive":true,"end":"4.0.3","endInclusive":false}}],"versionsText":"≥ 4.0.0, < 4.0.3","eol":null,"hubHref":null}],"affectedCount":1,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://crates.io/crates/cap-primitives","label":"crates.io/crates/cap-primitives","hostname":"crates.io","tags":["PACKAGE"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0482.html","label":"rustsec.org/advisories/RUSTSEC-2026-0482.html","hostname":"rustsec.org","tags":["Advisory"]},{"url":"https://github.com/bytecodealliance/cap-std/pull/419","label":"github.com/bytecodealliance/cap-std/pull/419","hostname":"github.com","tags":["WEB"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":["CVE-2026-115392","RUSTSEC-2026-0269"]},"timeline":[{"kind":"published","date":"2026-08-20T12:00:00.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-11-11T08:45:02.459Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"priority":{"label":"prioritise","tag":"severe","reason":"Severe, CVSS 9 (OSV · Crates.io); no exploitation reported by the 5 checked sources; EPSS not yet published","nextStep":"Check applicability and the vendor advisory: no fix release is recorded here","rank":[0,0,0,0,0,90],"checkedSources":["cisa","enisa","circl","shadowserver","cisa-adp"],"evidence":[{"type":"cvss","source":"osv_crates.io","date":"2026-11-11T08:45:02.459Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":9,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","version":"3.1","headline":true}],"epss":{"value":null,"date":null,"stale":false,"promoted":null},"sources":[{"id":"cisa","lastSuccessfulSync":"2026-12-05T10:02:10.250Z","state":"fresh"},{"id":"enisa","lastSuccessfulSync":"2026-12-05T10:02:10.837Z","state":"fresh"},{"id":"circl","lastSuccessfulSync":"2026-12-05T10:02:11.033Z","state":"fresh"},{"id":"shadowserver","lastSuccessfulSync":null,"state":"unavailable"},{"id":"cisa-adp","lastSuccessfulSync":"2026-12-05T10:01:03.214Z","state":"fresh"},{"id":"epss","lastSuccessfulSync":"2026-12-05T10:02:08.667Z","state":"fresh"},{"id":"osv","lastSuccessfulSync":"2026-12-05T10:02:07.694Z","state":"fresh"}],"feedEvent":null},"meta":{"dataAsOf":"2026-12-05T11:03:35.635Z","stale":false,"partial":false}}