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.
Recorded fixes — cap-primitives: 3.4.6 or 4.0.3. Check your release branch.
Exploitation not established
| Affected range | Recorded fix |
|---|---|
| From 0.0.0-0 before 3.4.6Semantic versions | 3.4.6 |
| From 4.0.0 before 4.0.3Semantic versions | 4.0.3 |
Version evidence: OSV · RUSTSEC-2026-0482
View original version evidence
{
"ranges": [
{
"events": [
{
"introduced": "0.0.0-0"
},
{
"fixed": "3.4.6"
},
{
"introduced": "4.0.0"
},
{
"fixed": "4.0.3"
}
],
"type": "SEMVER"
}
],
"versions": []
}