CVE-2026-27204: Wasmtime WASI implementations are vulnerable to guest-controlled resource exhaustion

Published Feb 24, 2026
·
Updated

Impact

Wasmtime's implementation of WASI host interfaces are susceptible to guest-controlled resource exhaustion on the host. Wasmtime did not appropriately place limits on resource allocations requested by the guests. This serves as a Denial of Service vector where a guest can induce a range of crashing behaviors on the host such as:

Allocating arbitrarily large amounts of host memory. Causing an allocation failure on the host, which in Rust defaults to aborting the process. Causing a panic on the host due to over-large allocations being performed. Cause degredation in performance of the host by holding excessive host memory alive.

Wasmtime's security bug policy considers all of these behaviors a security vulnerability. Wasmtime's implementation of WASI has a number of different ways that resource exhaustion could happen, and fixing any one of them is insufficient from solving this vulnerability. A number of individual issues are grouped within this advisory and as a whole represent the known ways that guests can exhaust resources on the host.

An example of guest-controlled resource exhaustion within Wasmtime's implementation of WASI is guests could repeatedly allocate handles to themselves without limit. Some APIs also caused the host to perform a guest-controlled-sized allocation of a buffer on the host for I/O operations. Other APIs could force the host to buffer arbitrary amounts of data for the guest. Finally the guest could hand arbitrarily large allocations from itself to the host which could cause the host to perform an arbitrarily sized copy of memory which in some situations could result in quadratically sized allocations.

Wasmtime's implementations of WASIp1 and WASIp2 are affected by this vulnerability. Any host API modeled with the Component Model (or WIT) which operates on a string or list<T> type is also affected. Not all WIT and WASI APIs are affected by this issue, but that's more of an exception so it's recommended for all embedders to consider themselves affected.

To address this issue a number of mitigations are being applied to limit the behavior of a guest in WASI. All of these mitigations manifest in the form of a limit of some kind applied to various situations, and as such all of these mitigations are backwards-incompatible as they run the risk of breaking preexisting programs. To address this all backports to previous stable releases have these limits tuned to overly-large values. This ensures that preexisting guests do not break while still providing embedders the knobs to prevent this DoS vector as well. The limits added to Wasmtime are:

-Smax-resources=N or ResourceTable::setmaxcapacity - the maximum number of resources that a guest is allowed to allocate for itself. -Shostcall-fuel=N or Store::sethostcallfuel - the maximum amount of data that the guest may copy to the host in a single function call. -Smax-random-size=N or WasiCtxBuilder::maxrandomsize - the maximum size of the return value of get-random-bytes and get-insecure-random-bytes in the wasi:random implementations. -Smax-http-fields-size=N or WasiHttpCtx::setmaxfieldssize - the maximum size of headers for an HTTP request/response.

These settings are equally applicable to both WASIp1 and WASIp2. Wasmtime 41.0.x and prior previously did not limit these settings and the knobs being released are set to very large values by default to avoid any breaking behavior. Embedders will need to proactively tune these knobs as appropriate for their embeddings. The default settings in the unreleased Wasmtime 42.0.0 are 1M for max resources, 128MiB for hostcall fuel, 64MiB for max-random-size, and 32KiB for http fields size. Tuning is not expected for Wasmtime 42.0.0+.

Hosts/embedders affected by this issue are encouraged to audit and double-check their own host APIs they have implemented to see whether they are affected by this issue as well. The -Shostcall-fuel setting is intended to be a relatively coarse fix for many possible issues by limiting the amount of data for all host APIs at once, so many embedders may not need to take further action beyond updating Wasmtime and configuring it appropriately (if not updating to 42.0.0). Embedders should audit to see, however, if the guest is able to force the host to allocate on its behalf and ensure that the allocation is limited or tracked somehow.

Patches

Wasmtime 24.0.6, 36.0.6, 40.0.4, 41.0.4, and 42.0.0 have all been released with the fix for this issue. These versions do not prevent this issue in their default configuration to avoid breaking preexisting behaviors. All versions of Wasmtime have appropriate knobs to prevent this behavior, and Wasmtime 42.0.0-and-later will have these knobs tuned by default to prevent this issue from happening.

Workarounds

There are no known workarounds for this issue without upgrading. Embedders are recommended to upgrade and configure their embeddings as necessary to prevent possibly-malicious guests from triggering this issue.

Resources

Store::sethostcallfuel ResourceTable::setmaxcapacity WasiCtxBuilder::maxrandomsize Original PR showing resource exhaustion Issue about limiting max resource handles per-guest

Other sources

Wasmtime is a runtime for WebAssembly. Prior to versions 24.0.6, 36.0.6, 4.0.04, 41.0.4, and 42.0.0, Wasmtime's implementation of WASI host interfaces are susceptible to guest-controlled resource exhaustion on the host. Wasmtime did not appropriately place limits on resource allocations requested by the guests. This serves as a Denial of Service vector. Wasmtime 24.0.6, 36.0.6, 40.0.4, 41.0.4, and 42.0.0 have all been released with the fix for this issue. These versions do not prevent this issue in their default configuration to avoid breaking preexisting behaviors. All versions of Wasmtime have appropriate knobs to prevent this behavior, and Wasmtime 42.0.0-and-later will have these knobs tuned by default to prevent this issue from happening. There are no known workarounds for this issue without upgrading. Embedders are recommended to upgrade and configure their embeddings as necessary to prevent possibly-malicious guests from triggering this issue.

NVD

Affected Software

8 affected componentsFixes available
rust/wasmtime>=41.0.0<41.0.4
41.0.4
rust/wasmtime>=37.0.0<40.0.4
40.0.4
rust/wasmtime>=25.0.0<36.0.6
36.0.6
rust/wasmtime<24.0.6
24.0.6
bytecodealliance Wasmtime Rust<24.0.6
bytecodealliance Wasmtime Rust>=25.0.0<36.0.6
bytecodealliance Wasmtime Rust>=37.0.0<40.0.4
bytecodealliance Wasmtime Rust>=41.0.0<41.0.4

Event History

Feb 24, 2026
Advisory Published
via GitHub·08:47 PM
Data Sourced
via GitHub·08:47 PM
DescriptionWeaknessAffected Software
CVE Published
via MITRE·09:23 PM
Data Sourced
via MITRE·09:23 PM
DescriptionWeakness
Data Sourced
via NVD·10:16 PM
DescriptionSeverityWeaknessAffected Software
Jan 4, 58137
Event
via FIRST·12:47 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-27204?

CVE-2026-27204 has been identified as a significant vulnerability due to its potential for guest-controlled resource exhaustion on the host.

2

How do I fix CVE-2026-27204?

To mitigate CVE-2026-27204, update the Wasmtime package to version 41.0.4, 40.0.4, 36.0.6, or 24.0.6 as applicable.

3

What versions are affected by CVE-2026-27204?

CVE-2026-27204 affects Wasmtime versions prior to 41.0.4, 40.0.4, 36.0.6, and 24.0.6.

4

How does CVE-2026-27204 impact Wasmtime?

CVE-2026-27204 allows for guest-controlled resource exhaustion, which may lead to denial of service for the host.

5

Who is affected by CVE-2026-27204?

Any users or applications utilizing affected versions of Wasmtime are at risk from CVE-2026-27204.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203