Read the docs
TI-2022-08604 Aliases CVE-2022-24791GHSA-gwc9-348x-qwv2

Use after free in Wasmtime

Priority MEDIUM 45CWE-416Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-416 and the CVSS impact.

Summary

Wasmtime is a standalone JIT-style runtime for WebAssembly, using Cranelift. There is a use after free vulnerability in Wasmtime when both running Wasm that uses externrefs and enabling epoch interruption in Wasmtime. If you are not explicitly enabling epoch interruption (it is disabled by default) then you are not affected. If you are explicitly disabling the Wasm reference types proposal (it is enabled by default) then you are also not affected. The use after free is caused by Cranelift failing to emit stack maps when there are safepoints inside cold blocks. Cold blocks occur when epoch interruption is enabled. Cold blocks are emitted at the end of compiled functions, and change the order blocks are emitted versus defined. This reordering accidentally caused Cranelift to skip emitting some stack maps because it expected to emit the stack maps in block definition order, rather than block emission order. When Wasmtime would eventually collect garbage, it would fail to find live references on the stack because of the missing stack maps, think that they were unreferenced garbage, and therefore reclaim them. Then after the collection ended, the Wasm code could use the reclaimed-too-early references, which is a use after free. Patches have been released in versions 0.34.2 and 0.35.2, which fix the vulnerability. All Wasmtime users are recommended to upgrade to these patched versions. If upgrading is not an option for you at this time, you can avoid the vulnerability by either: disabling the Wasm reference types proposal, config.wasm_reference_types(false); or by disabling epoch interruption if you were previously enabling it. config.epoch_interruption(false).

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.01179 67th percentileScored 2026-11-07
Fix Fixed wasmtime (bytecodealliance): 0.34.2, 0.35.2wasmtime (crates.io): 0.34.2, 0.35.2

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
bytecodealliancewasmtimebefore 0.34.2; 0.35.0 to before 0.35.20.34.2, 0.35.2Patch availableCNA
—wasmtime (crates.io)before 0.34.20.34.2Patch availableGHSA-gwc9-348x-qwv2
—wasmtime (crates.io)0.35.0 to before 0.35.20.35.2Patch availableGHSA-gwc9-348x-qwv2
  • wasmtime Vendorbytecodealliance Affected before 0.34.2; 0.35.0 to before 0.35.2 Fixed in 0.34.2, 0.35.2 Patch available CNA
  • wasmtime (crates.io) Vendor— Affected before 0.34.2 Fixed in 0.34.2 Patch available GHSA-gwc9-348x-qwv2
  • wasmtime (crates.io) Vendor— Affected 0.35.0 to before 0.35.2 Fixed in 0.35.2 Patch available GHSA-gwc9-348x-qwv2

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:bytecodealliance:wasmtime:*:*:*:*:*:rust:*:*0.34.0 to before 0.34.2; 0.35.0 to before 0.35.2Vulnerablebytecodealliance
  • cpe:2.3:a:bytecodealliance:wasmtime:*:*:*:*:*:rust:*:* Versions 0.34.0 to before 0.34.2; 0.35.0 to before 0.35.2 Vulnerable ·bytecodealliance

Remediation

  • Fix · CNA wasmtime (bytecodealliance) Fixed in 0.34.2, 0.35.2
  • Fix · GHSA-gwc9-348x-qwv2 wasmtime (crates.io) Fixed in 0.34.2 Advisory →
  • Fix · GHSA-gwc9-348x-qwv2 wasmtime (crates.io) Fixed in 0.35.2 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2022-24791
  2. 2026-10-03 Alias added: GHSA-gwc9-348x-qwv2

References

  • TI-2026-21632 Wasmtime is vulnerable to panic when dropping a `[Typed]Func::call_async` future CVSS 4.0MEDIUM 6.9
  • TI-2023-11636 Guest-controlled out-of-bounds read/write on x86_64 in wasmtime CVSS 3.1CRITICAL 10.0
  • TI-2022-18765 Wasmtime vulnerable to data leakage between instances in the pooling allocator CVSS 3.1HIGH 8.6
  • TI-2022-18766 wasmtime_trap_code C API function has out of bounds write vulnerability CVSS 3.1CRITICAL 9.8
  • TI-2026-27209 Wasmtime with Winch compiler backend on aarch64 may allow a sandbox-escaping memory access CVSS 4.0CRITICAL 9.0
  • TI-2026-27193 Wasmtime miscompiled guest heap access enables sandbox escape on aarch64 Cranelift CVSS 4.0CRITICAL 9.0
See all 40 →

Sources