CVE-2026-104855: Wasmtime: Preemption and traps during bulk operations enable breaking internal VM state

Published Oct 2, 2026
·
Updated

Impact

Wasmtime's implementation of bulk-data-transfer WebAssembly instructions, such as memory.copy, contains a vulnerability when a preemption via epochs or fuel is combined with altering the store's state or cancelling a computation. To prevent these operations from taking too long Wasmtime injects fuel/epoch checks during these operations, but this enables embedders, and possible WebAssembly, to witness intermediate state in the middle of the operation. Examples of this include:

When a non-nullable WebAssembly table is grown the new elements initially start as null and are filled in as part of a loop with preemption checks. If this computation is then cancelled this left the table in a grown-but-uninitialized state where subsequent usage via WebAssembly could possibly segfault. Loads from this table are assumed to not be null due to its type, but the runtime implementation was exposed through this cancellation at a preemption point. Embedders could mutate the store during an epoch callback, such as growing a WebAssembly linear memory. During a bulk memory.copy operation, however, the pointers being copied to/from weren't recomputed between preemption points. This meant that if the linear memory moved its base address it could be possible to have a preemption, the embedder manually grows memory, and then on resumption the copy operation uses invalid pointers. Embedders could execute a GC during epoch callbacks. GC operations such as array.copy, like memory.copy above, maintained raw pointers internally in the operation which were not updated after the preemption point. This could lead to corruption of the GC heap.

All of these situations are examples of embedder-driven mutations of the Store or embedder-induced resumption of a Store after a computation was cancelled. These operations expose the internal state of these WebAssembly operations which is semantically incorrect and additionally can cause segfaults for example. Exposing these bugs, however, requires explicit patterns to be present in the embedding itself such as using Store::epochdeadlinecallback and mutating wasm options. Another example is to cancel one invocation (possibly in a table.grow) and then execute more wasm afterwards within the same store. Embeddings not using Store::epochdeadlinecallback or executing code after timeouts/fuel are not affected by this issue.

Patches

This issue is fixed in Wasmtime 46.0.2 and 47.0.3. In these versions Wasmtime reverts back to Wasmtime 45-and-earlier behavior for these operations to check fuel once before the operation and then not during the operation. This means that a very large memory.copy does not have preemption points in the middle of the operation any more, for example.

Workarounds

Embedders using Store::epochdeadlinecallback are safe if they only access the T in Store<T>. Embedders that do not continue using a store after a timeout or epoch deadline are also unaffected. Embedders which explicitly mutate the store in an epoch callback, or resume wasm after trapping have no workaround however. The embedding needs to be updated to account for this issue.

Other sources

Wasmtime is a runtime for WebAssembly. From 46.0.0 until 46.0.2 and 47.0.3, fuel and epoch preemption checks inside bulk operations including memory.copy, table.grow, and array.copy can expose invalid intermediate state when an embedder mutates a Store in Store::epochdeadlinecallback or continues using a Store after cancellation or a trap. A cancelled non-nullable table growth can leave null elements, linear-memory growth during memory.copy can invalidate retained raw pointers, and callback-triggered garbage collection during array.copy can invalidate GC pointers, resulting in a crash, invalid memory access, or GC heap corruption. Embeddings whose callbacks only access the host data in Store<T>, and embeddings that discard a Store after timeout or epoch deadline, are not affected. This issue is fixed in versions 46.0.2 and 47.0.3.

— MITRE

Affected Software

3 affected componentsFixes available
Wasmtime Wasmtime>=46.0.0<46.0.2, >=47.0.0<47.0.3
rust/wasmtime>=47.0.0<47.0.3
47.0.3
rust/wasmtime>=46.0.0<46.0.2
46.0.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade rust/wasmtime to a version that resolves this vulnerability.

    Fixed in 47.0.3
  2. Upgrade

    Upgrade rust/wasmtime to a version that resolves this vulnerability.

    Fixed in 46.0.2
  3. Upgrade

    Upgrade Wasmtime to a version that resolves this vulnerability.

    Fixed in 46.0.2
  4. Upgrade

    Upgrade Wasmtime to a version that resolves this vulnerability.

    Fixed in 47.0.3

Event History

Oct 2, 2026
CVE Published
via MITRE·05:37 PM
Data Sourced
via MITRE·05:37 PM
DescriptionWeakness
Data Sourced
via NVD·06:17 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·10:45 PM
Data Sourced
via GitHub·10:45 PM
DescriptionWeaknessAffected Software

Frequently Asked Questions

1

Which embeddings are exposed to this issue?

Embeddings are exposed when fuel or epoch preemption can occur during affected bulk operations and their epoch-deadline callback mutates the Store, or when they continue to use a Store after cancellation or a trap. Callbacks that access only Store<T> host data are not affected.

2

What conditions can lead to exploitation or impact?

The issue requires preemption checks during bulk operations such as memory.copy, table.grow, or array.copy, combined with unsafe Store use. Examples include cancelling a non-nullable table growth, growing linear memory during memory.copy while retaining raw pointers, or triggering garbage collection from a callback during array.copy.

3

What should I do if I cannot update immediately?

Do not mutate the Store from Store::epoch_deadline_callback; limit callbacks to accessing host data in Store<T>. Discard the Store after a timeout, epoch deadline, cancellation, or trap rather than continuing to use it.

4

Which versions contain the fixes?

The issue is fixed in Wasmtime 46.0.2 and 47.0.3. The affected range begins with 46.0.0 and includes versions before those fixes as described.

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