BTC
ETH
SOL
BNB
GOLD
XRP
DOGE
ADA
Back to home
Security

[MEDIUM] Security Advisory: Wasmtime has host panic when Winch compiler executes `table.fill` (wasmtime, wasmtime, wasmtime)

Wasmtime's Winch compiler crashes the host when compiling a valid WebAssembly module's table.fill instruction.

Wasmtime’s Winch compiler crashes the host when compiling a valid WebAssembly module’s table.fill instruction. This denial-of-service bug affects every supported architecture. Attackers—or careless developers—can trigger it remotely in sandboxed environments. Bytecode Alliance released patches today: versions 36.0.7, 42.0.2, and 43.0.1. Update immediately if you use Winch.

Wasmtime powers WebAssembly runtimes at scale. Companies like Fastly, Cloudflare, and Deno rely on it for serverless and edge computing. Its security model isolates guest code from the host, but this flaw punches a hole. A guest module exercises table.fill—a standard Wasm instruction for filling table elements—and Winch panics during ahead-of-time compilation. No malformed code required; fully spec-compliant modules suffice.

Root Cause

A refactoring in pull request #11254 altered how Wasmtime’s table instructions reference data. Developers updated the main code paths but overlooked Winch. Winch, Wasmtime’s newest compiler backend, uses an incompatible indexing scheme. It either accesses nonexistent tables or scrambles existing ones.

Winch’s design limits fallout. It can’t execute arbitrary code or leak memory—only panic the host or corrupt the wrong table. Table corruption runs afoul of the Wasm spec, potentially leading to undefined behavior in guests. But the primary threat is the panic: one module kills the entire host process.

Cranelift, Wasmtime’s default compiler, dodged this bullet. Its code paths got the fix. Winch users have no workaround; disable it or patch.

Fix and Timeline

Bytecode Alliance moved fast. They identified the mismatch, audited Winch’s table handling, and shipped fixes across stable branches. Check your version with wasmtime --version. If below the patches, upgrade via Cargo:

cargo update -p wasmtime-cli --precise 36.0.7

(adjust for your branch). Embedded users pull the corresponding libwasmtime crates.

Verify the patch inspects Winch’s lower_table_fill function, now aligned with the post-#11254 scheme. No regressions reported in testing.

Why This Matters

WebAssembly promises secure, portable code for untrusted inputs. Think blockchain VMs, serverless functions, or browser plugins. A DoS like this undermines that. In multi-tenant setups, one rogue module restarts the runtime, spiking latency and costs. Attackers probe with crafted Wasm, as seen in past JIT bugs like Spectre variants.

Winch targets peak performance—native speeds via better codegen. It’s opt-in, behind config.compiler = "winch", so exposure skews toward performance chasers. Still, adoption grows; benchmarks show 20-50% speedups over Cranelift on x86/ARM. This bug exposes the risks of bleeding-edge backends: regressions slip through.

Broader lesson: Refactors demand full audits, especially in compilers. Wasmtime’s track record stays solid—over 20 CVEs fixed since 2019, mostly memory safety. Bytecode Alliance’s transparency helps; they disclosed via GitHub advisory #2024-001. Skeptically, Winch’s youth (merged 2024) invites teething issues. Operators: Audit your Wasm pipelines. Reject untrusted modules or cap table ops. This patch closes the door, but watch for copycats in other runtimes like WasmEdge or wasmer.

Bottom line: Patch now. Winch boosts throughput, but stability trumps speed in production. Wasmtime remains a top Wasm choice—secure when maintained.

April 10, 2026 · 3 min · 13 views · Source: GitHub Security

Related