wasmtime
Affected
- introduced
29.0.0, fixed36.0.5(semver)
Fixed versions
36.0.5
Fix
- Fixed version
36.0.5cargo update -p wasmtime --precise 36.0.5
Advisory
Also known as: CVE-2026-24116, RUSTSEC-2026-0006
Wasmtime segfault or unused out-of-sandbox load with f64.copysign operator on x86-64
On x86-64 platforms with AVX Wasmtime's compilation of the f64.copysign WebAssembly instruction with Cranelift may load 8 more bytes than is necessary. When [signals-based-traps] are disabled this can result in a uncaught segfault due to loading from unmapped guard pages. With guard pages disabled it's possible for out-of-sandbox data to be loaded, but unless there is another bug in Cranelift this data is not visible to WebAssembly guests.
Details
The f64.copysign operator, when operating on a value loaded from a memory (for example with f64.load), compiles with Cranelift to code on x86-64 with AVX that loads 128 bits (16 bytes) rather than the expected 64 bits (8 bytes) from memory. When the address is in-bounds for a (correct) 8-byte load but not an (incorrect) 16-byte load, this can load beyond memory by up to 8 bytes. This can result in three different behaviors depending on Wasmtime's configuration:
Wasmtime's default configuration is case (2) in this case. That means that Wasmtime, by default, incorrectly executes this WebAssembly instruction but does not have insecure behavior.
Impact
If [signals-based-traps] are disabled and guard pages are enabled then guests can trigger an uncaught segfault in the host, likely aborting the host process. This represents, for example, a DoS vector for WebAssembly guests.
This bug does not affect Wasmtime's default configuration and requires [signals-based-traps] to be disabled. This bug only affects the x86-64 target with the AVX feature enabled and the Cranelift backend (Wasmtime's default backend).
Patches
Wasmtime 36.0.5, 40.0.3, and 41.0.1 have been released to fix this issue. Users are recommended to upgrade to the patched versions of Wasmtime. Other affected versions are not patched and users should updated to supported major version instead.
Workarounds
This bug can be worked around by enabling [signals-based-traps]. While disabling guard pages can be a quick fix in some situations, it's not recommended to disabled guard pages as it is a key defense-in-depth measure of Wasmtime.
Resources
[signals-based-traps]: https://docs.rs/wasmtime/latest/wasmtime/struct.Config.html#method.signals_based_traps
Medium Basis: The source's own band: MODERATE
29.0.0, fixed 36.0.5 (semver)36.0.5
36.0.5cargo update -p wasmtime --precise 36.0.537.0.0, fixed 40.0.3 (semver)40.0.3
40.0.3cargo update -p wasmtime --precise 40.0.341.0.0, fixed 41.0.1 (semver)41.0.1
41.0.1cargo update -p wasmtime --precise 41.0.1Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0