CVE-2024-51756 — Vulnerability in cap-std — CVE Details
cap-std doesn't fully sandbox all the Windows device filenames
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.90%). Schedule for your next planned update.
Does your project use an affected cap-std version?
Paste your Cargo.lock to check it for CVE-2024-51756 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.
Summary
Impact
cap-std's filesystem sandbox implementation on Windows blocks access to special device filenames such as "COM1", "COM2", "LPT0", "LPT1", and so on, however it did not block access to the special device filenames which use superscript digits, such as "COM¹", "COM²", "LPT⁰", "LPT¹", and so on. Untrusted filesystem paths could bypass the sandbox and access devices through those special device filenames with superscript digits, and through them provide access peripheral devices connected to the computer, or network resources mapped to those devices. This can include modems, printers, network printers, and any other device connected to a serial or parallel port, including emulated USB serial ports.
Patches
The bug is fixed in https://github.com/bytecodealliance/cap-std/pull/371, which is published in cap-primitives 3.4.1, cap-std 3.4.1, and cap-async-std 3.4.1.
Workarounds
There are no known workarounds for this issue. Affected Windows users are recommended to upgrade.
References
- Microsoft's documentation of the special device filenames
- ISO-8859-1
- https://github.com/bytecodealliance/cap-std/pull/371
Advisory Timeline
- First published November 5, 2024 (751 days ago).
- Last revised September 10, 2026 — 673 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
cargo update -p cap-std --precise 3.4.1
cargo update -p cap-async-std --precise 3.4.1
cargo update -p cap-primitives --precise 3.4.1
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (3)
Affects 1 ecosystem: crates.io (3).
| Package | Fixed In |
|---|---|
| cap-std crates.io · Affected: All versions | 3.4.1 |
| cap-async-std crates.io · Affected: All versions | 3.4.1 |
| cap-primitives crates.io · Affected: All versions | 3.4.1 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-22Path TraversalMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 5.9 score means for each attack dimension.
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
References
- https://github.com/bytecodealliance/cap-std/security/advisories/GHSA-hxf5-99xg-86hwWEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-51756ADVISORY
- https://github.com/bytecodealliance/cap-std/pull/371WEB
- https://github.com/bytecodealliance/cap-std/commit/dcc3818039761331fbeacbb3a40c542b65b5ebf7WEB
- https://en.wikipedia.org/wiki/ISO/IEC_8859-1WEB
- https://github.com/bytecodealliance/cap-stdPACKAGE
- https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventionsWEB
- https://rustsec.org/advisories/RUSTSEC-2024-0445.htmlWEB
Frequently Asked Questions
- What is CVE-2024-51756?
- cap-std doesn't fully sandbox all the Windows device filenames. This vulnerability has been assigned a severity rating of LOW (CVSS score: 5.9/10).
- How do I check if my project is affected by CVE-2024-51756?
- CVE-2024-51756 affects cap-std, cap-async-std and cap-primitives. It has a 0.9% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-51756 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This is an above-median EPSS score — 57.5% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- RUSTSEC-2026-0482CRITICAL
Paths or symlinks ending in a slash escape the sandbox
- CVE-2026-54786LOW
Wasmtime has a leak in WASIp1 `fd_renumber` implementation
- CVE-2026-41677LOW
rust-opennssl has an Out-of-bounds read in PEM password callback when returning an oversized length