NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · Rust (crates.io)

CVE-2024-51756: cap-std doesn't fully sandbox all the Windows device filenames

lowCVSS 4.0 2.3GHSA-hxf5-99xg-86hw

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.

Published Nov 5, 2024 · Updated Dec 20, 2025

Affected packages

cap-std

Ecosystem
Rust (crates.io)
Affected
< 3.4.1
Fixed in
3.4.1
Check
cargo tree -i cap-std

cap-async-std

Ecosystem
Rust (crates.io)
Affected
< 3.4.1
Fixed in
3.4.1
Check
cargo tree -i cap-async-std

cap-primitives

Ecosystem
Rust (crates.io)
Affected
< 3.4.1
Fixed in
3.4.1
Check
cargo tree -i cap-primitives

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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

Credited to nathaniel-daniel.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology