Skip to main content

CVE-2024-51756 — Vulnerability in cap-std — CVE Details

LOW

cap-std doesn't fully sandbox all the Windows device filenames

Published November 5, 2024Updated September 10, 2026Source: OSV

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.

Check my Cargo.lock

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

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 cap-std to 3.4.1 or later
cargo update -p cap-std --precise 3.4.1
Cargo
Update cap-async-std to 3.4.1 or later
cargo update -p cap-async-std --precise 3.4.1
Cargo
Update cap-primitives to 3.4.1 or later
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).

PackageFixed In
cap-std crates.io · Affected: All versions3.4.1
cap-async-std crates.io · Affected: All versions3.4.1
cap-primitives crates.io · Affected: All versions3.4.1

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 5.9 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

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

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

CVSS Score
5.9

Exploitation requires specific conditions, or the impact is limited.

EPSS Score (30-day exploit probability)
0.90%
EPSS percentile: 57.5

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

GHSA-hxf5-99xg-86hw
RUSTSEC-2024-0445

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my Cargo.lock