Cap primitives: Paths or symlinks ending
Affects cap-primitivesSource GCVE Database
CVSS 9.0 Critical : upgrade to 4.0.3 or 3.4.6 as a priority.
Data as of 11 Nov 2026, 09:47 UTC
- Patch
- Available – fixed in 4.0.3, 3.4.6
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:NWhat to do
Upgrade cap-primitives to 4.0.3 or 3.4.6.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
crates.iocap-primitivespkg:cargo/cap-primitivesOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A fix is available in cap-primitives versions 3.4.6 and 4.0.3. Users should upgrade to these versions or later to remediate the vulnerability. Removing trailing slashes from untrusted input is not an effective workaround. No additional mitigation steps are indicated by the vendor advisory.
Description
A vulnerability in cap-primitives allows paths or symlinks ending with a slash to bypass sandbox restrictions. The resolver incorrectly re-adds a trailing slash before opening the last path component, causing the operating system to follow symlinks outside the sandbox. This affects operations like open, directory creation, removal, and renames outside the sandbox. The issue impacts cap-primitives versions before 3.4.6 and versions 4.0.0 up to but not including 4.0.3. A fix is available in versions 3.4.6 and 4.0.3.