HIGH🇵🇱 Wersja polska

CVE-2022-24791

CVSS 8.1v3.1pub. 2022-03-31upd. 2024-11-21

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).

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Bytecodealliance Wasmtime

    APP
    Bytecodealliance
    0.34.0 – 0.34.2 (bez)0.35.0 – 0.35.2 (bez)
🔵
CHECK WITH VENDOR
No clear patch data available. Check vendor references.
Tags
Memory
CWE
References

Related vulnerabilities

CVE-2026-34971CRITICAL9.0PL ✓ten sam produkt

Wasmtime Cranelift: ucieczka z sandbox przez błędną kompilację na aarch64

CVE-2026-34987CRITICAL9.0PL ✓ten sam produkt

Wasmtime (Winch): ucieczka z sandboxa WebAssembly, dostęp do pamięci hosta

CVE-2023-26489CRITICAL9.9ten sam produkt

wasmtime is a fast and secure runtime for WebAssembly. In affected versions wasmtime's code generator, Craneli...

CVE-2022-39393HIGH8.6ten sam produkt

Wasmtime is a standalone runtime for WebAssembly. Prior to versions 2.0.2 and 1.0.2, there is a bug in Wasmtim...

CVE-2026-44216MEDIUM5.9ten sam produkt

Wasmtime is a runtime for WebAssembly. From 30.0.0 to 36.0.8, 43.0.2, and 44.0.1, Wasmtime's allocation logic ...