Skip to main content
Menu
Advisories

Wasmtime wasi:http implementation panics with a zero timeout supplied

GHSA-W4QR-P94G-MJHVPublished Updated GitHub

Description

Impact

Wasmtime's implementation of wasi:http for both WASIp2 and WASIp3 contained a bug where when a 0 timeout was specified for the between-bytes-timeout request option this would trigger a panic on the host. The duration from the guest was forwarded directly to a Tokio API, a dependency of Wasmtime's wasi:http implementation, which is documented as panicking when a 0 duration was pased to it. A guest-triggerable panic on the host is considered a denial-of-service vulnerability in Wasmtime.

This bug affects any user of the wasmtime-wasi-http crate in Wasmtime when the default-send-request Cargo feature is enabled, which is enabled by default. Embedders which do not use Wasmtime's implementation of wasi:http are unaffected.

Patches

Wasmtime 48.0.4 and 49.0.2 have been released which fix this panic by clamping the timeout duration to 1 nanosecond.

Workarounds

There is no known workaround for this issue at this time and it's recommended that users upgrade or change their embedding to not provide wasi:http APIs.

Affected versions

References

GitHub · bytecodealliance/wasmtime