CVE-2026-115889: Wasmtime: Bit-packing in Cranelift compiler causes silent overflow and miscompilation
Wasmtime's Cranelift compiler packs SSA value indices into fewer than 32 bits. In release builds a very large or crafted Wasm function can overflow them silently and produce wrong machine code. A malicious Wasm module can use this to escape the sandbox. Any Wasmtime below 36.0.19, or 37.0.0 through 42.x, is affected. Upgrade to 36.0.19 or 43.0.0.
Published Oct 23, 2026 · Analysis Oct 24, 2026
What an attacker can do
Cranelift refers to SSA values by index inside its IR. Before Wasmtime 43, those indices were bit-packed, and release builds did not check for overflow. A Wasm function body that is huge, or built to use many SSA values, pushes an index past the packed limit. The index wraps and points at the wrong value. The compiler then emits code that treats one value as another.
The advisory calls the result arbitrary miscompilation: type confusion or other arbitrary side effects that break out of the sandbox. The CWEs are numeric truncation (CWE-197) and type confusion (CWE-843).
The affected setup is any Wasmtime engine with default settings, which means the Cranelift backend, on any architecture or platform. An attacker needs to get a crafted module compiled by your engine. That fits plugin systems, serverless and edge runtimes, and any service that runs user-supplied Wasm. The CVSS vector has low privileges and changed scope: a tenant who can upload a module can reach the host process and whatever it holds.
Precompiled code is a separate concern. A module compiled by a vulnerable engine carries the miscompiled output with it.
Who is affected
Affected: the wasmtime crate below 36.0.19, and 37.0.0 up to but not including 43.0.0. This covers embedders that link Wasmtime as a Rust crate and users of the wasmtime CLI. Applications that bundle Wasmtime through other language bindings inherit the engine version they ship.
Check a Rust project:
cargo tree -i wasmtimeCheck the CLI:
wasmtime --versionwasmtime
- Ecosystem
- Rust (crates.io)
- Affected
- < 36.0.19
- Fixed in
- 36.0.19
- Check
cargo tree -i wasmtime
wasmtime
- Ecosystem
- Rust (crates.io)
- Affected
- >= 37.0.0, < 43.0.0
- Fixed in
- 43.0.0
- Check
cargo tree -i wasmtime
How to fix it
Upgrade to 36.0.19 if you are on the 36.x line, or to 43.0.0 otherwise. In a Rust project:
cargo update -p wasmtimeAdjust the version requirement in Cargo.toml first if it pins an older release. Wasmtime 43 changed Cranelift to use a full u32 index and to check when that limit is exceeded. The advisory and RustSec entry list no workarounds. Rebuild and redeploy every binary that embeds Wasmtime, and recompile any cached or precompiled modules with the patched engine.
How to tell if you were hit
The sources give no log signature for this bug. A miscompiled module may crash or behave oddly, but a successful escape could leave no trace. Review which Wasm modules your service accepted from untrusted parties and flag unusually large functions. Inventory every deployed Wasmtime version with cargo tree or your SBOM. Treat hosts that ran untrusted modules on an affected engine as potentially compromised.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
In Wasmtime prior to v43, the Cranelift compiler backend bit-packs its SSA value indices in a way that can result in silent overflow in release builds, and result in incorrect value references in the IR resulting in arbitrary miscompilation. A very large Wasm function body, or one that is specially crafted to use many SSA values, can use this to force type-confusion or other arbitrary side-effects and escape the sandbox.
Cranelift was changed in Wasmtime v43 to use a full u32 index, with checks if that limit is exceeded, and so is no longer susceptible to this bug.
Impact
A Wasmtime engine with default settings (using the Cranelift backend) on any architecture/platform could experience a sandbox escape from a specially-crafted Wasm module.
Patches
Wasmtime v36.0.19 has been released which fixes this issue.
Credited to jaydns.
Questions
- Which Wasmtime versions fix CVE-2026-115889?
36.0.19 for the 36.x line and 43.0.0 for newer releases. RustSec lists the patched ranges as >=36.0.19,<37.0.0 and >=43.0.0. Versions 37 through 42 have no patch on their own lines, so move to 43.0.0.
- Do I need non-default settings to be vulnerable?
No. The advisory says an engine with default settings, using the Cranelift backend, on any architecture or platform can be hit by a crafted Wasm module.
- Is this only a problem if I run untrusted Wasm?
The attack needs a crafted module to be compiled by your engine. If you only run modules you build and trust, the exposure is much lower. Services that accept third-party Wasm face the full risk.
- Is it exploited in the wild?
No source read says so, and the entry is not in CISA's KEV catalog.
References
Read for this analysis:
- https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-897f-g5gm-fmxm
- https://rustsec.org/advisories/RUSTSEC-2026-0380.html
- https://github.com/bytecodealliance/wasmtime/pull/12613
- https://github.com/bytecodealliance/wasmtime/pull/14818
- https://github.com/bytecodealliance/wasmtime/commit/ba8f7d70caa1825b7f64fa75cd9d03f4a438dae0
- https://github.com/bytecodealliance/wasmtime/commit/f517bd6e890c7c1291ab9fe05d8cc0c9f11e56aa
- https://github.com/bytecodealliance/wasmtime/releases/tag/v36.0.19
- https://github.com/bytecodealliance/wasmtime/releases/tag/v43.0.0
- https://github.com/advisories/GHSA-897f-g5gm-fmxm
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
