Skip to content
OpenAdvisories
Low · 2.3 CVE-2024-51756 EUVD-2024-3267GHSA-hxf5-99xg-86hwRUSTSEC-2024-0445

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

Published Nov 5, 2024 · Updated Nov 6, 2024 · Assigned by GitHub_M

Description

The cap-std project is organized around the eponymous `cap-std` crate, and develops libraries to make it easy to write capability-based code. 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. The bug is fixed in #371, which is published in cap-primitives 3.4.1, cap-std 3.4.1, and cap-async-std 3.4.1. There are no known workarounds for this issue. Affected Windows users are recommended to upgrade.

Affected products

VendorProductAffectedFixed
bytecodealliance cap-std < 3.4.1 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling wash 0.36.1-r2 —
Wolfi rolling wasmcloud 1.4.0-r2 —
Wolfi rolling wasmtime 26.0.1-r0 —
Wolfi rolling wizer 7.0.5-r3 —
Wolfi rolling zed 0.159.10-r1 —
Wolfi rolling zellij +3 0.41.2-r1 —

Affected packages

EcosystemPackageAffectedFixedRecord
crates.io cap-async-std < 3.4.1 3.4.1 GHSA-hxf5-99xg-86hw
crates.io cap-primitives < 3.4.1 3.4.1 GHSA-hxf5-99xg-86hw
crates.io cap-primitives >= 0.0.0-0, < 3.4.1 3.4.1 RUSTSEC-2024-0445
crates.io cap-std < 3.4.1 3.4.1 GHSA-hxf5-99xg-86hw

References