CVE-2024-51745 Wasmtime doesn't fully sandbox all the Windows device filenames
Untrusted WebAssembly programs can bypass filesystem sandboxing on Windows to access serial and parallel devices via superscript filenames.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-51745?
CVE-2024-51745 is a low-severity vulnerability in bytecodealliance wasmtime, published on 5 Nov 2024. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
Wasmtime is a fast and secure runtime for WebAssembly. Wasmtime'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 Wasm programs that are given access to any filesystem directory could bypass the sandbox and access devices through those special device filenames with superscript digits, and through them gain 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. Patch releases for Wasmtime have been issued as 24.0.2, 25.0.3, and 26.0.1. Users of Wasmtime 23.0.x and prior are recommended to upgrade to one of these patched versions. There are no known workarounds for this issue. Affected Windows users are recommended to upgrade.
Which versions are affected by CVE-2024-51745?
7 open source packages ship an affected version, including wasmtime. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
wasmtime crates.io | All versions | 24.0.2 |
wasmtime crates.io | All versions | 24.0.2 |
wasmtime crates.io | From 0.0.0-0 | 24.0.2, 25.0.3, 26.0.1 |
wasmtime crates.io | From 25.0.0 | 25.0.3 |
wasmtime crates.io | From 25.0.0 | 25.0.3 |
wasmtime crates.io | From 26.0.0 | 26.0.1 |
1 more packages
wasmtime crates.io | From 26.0.0 | 26.0.1 |
Products include Bytecodealliance Wasmtime.
How do I fix CVE-2024-51745?
Upgrade wasmtime to a fixed version for your release line: 24.0.2, 25.0.3 or 26.0.1.
Is CVE-2024-51745 being exploited?
There is no known exploitation of CVE-2024-51745 in the wild and no public exploit code.
Other vulnerabilities in bytecodealliance wasmtime
- CVE-2026-34971 Wasmtime miscompiled guest heap access enables sandbox escape on aarch64 Cranelift
- CVE-2026-34987 Wasmtime with Winch compiler backend on aarch64 may allow a sandbox-escaping memory access
- CVE-2022-39393 Wasmtime vulnerable to data leakage between instances in the pooling allocator
- CVE-2022-24791 Use after free in Wasmtime
- CVE-2026-47261 Wasmtime: WASI path_open(TRUNCATE) bypasses `FilePerms::WRITE` host restriction
Sources
Also known as DEBIAN-CVE-2024-51745, GHSA-c2f5-jxjv-2hh8, JLSEC-2026-1348, RUSTSEC-2024-0438.