CVE-2026-140420: wasmtime-wasi: Unbounded host memory growth via empty writes to `AsyncWriteStream`
This is an entry in the RustSec database for the Wasmtime security advisory located at https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-5m8g-xhq4-4h93 For more information see the GitHub-hosted security advisory.
Other sources
wasmtime-wasi in Wasmtime before 36.0.21, 37.0.0 before 48.0.9, 49.0.0 before 49.0.6, and 50.0.0 before 50.0.2 allows unbounded host memory growth because AsyncWriteStream queues zero-length writes without charging them against its write budget. A malicious guest can repeatedly call wasi:io/streams output-stream.write with empty lists, exhausting host memory and causing denial of service.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
rust/wasmtimeto a version that resolves this vulnerability.Fixed in 36.0.21 - Upgrade
Upgrade
rust/wasmtimeto a version that resolves this vulnerability.Fixed in 48.0.9 - Upgrade
Upgrade
rust/wasmtimeto a version that resolves this vulnerability.Fixed in 49.0.6 - Upgrade
Upgrade
rust/wasmtimeto a version that resolves this vulnerability.Fixed in 50.0.2
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
Deployments using the wasmtime-wasi crate in Wasmtime versions before 36.0.21, versions 37.0.0 through before 48.0.9, versions 49.0.0 through before 49.0.6, or versions 50.0.0 through before 50.0.2 are affected.
What must an attacker be able to do to trigger the denial of service?
An attacker needs to run or control a malicious WASI guest that can call wasi:io/streams output-stream.write. The guest repeatedly submits empty write lists, causing AsyncWriteStream to queue writes without consuming its write budget.
What is the impact of successful exploitation?
Repeated zero-length writes can cause unbounded memory growth in the host. This can exhaust host memory and deny service to the Wasmtime host or workloads running on it.