CVE-2023-26489CWE-125CWE-787

Guest-controlled out-of-bounds read/write on x86_64 in wasmtime

Critical · published March 8, 2023

CVSS v3.1
10.0
EPSS
1%
Percentile
69.2
In the wild
Unconfirmed
What it is

🚨 A sneaky bug in Wasmtime's code generator could let guest modules read and write memory 34G away from their base, putting sensitive data at risk! 🔥 Think of it like a mischievous guest at a hotel who finds a way to access the penthouse suite simply by manipulating their room key — suddenly, they can rummage through other guests' valuables! An attacker could exploit this vulnerability to access and modify memory that belongs to other WebAssembly instances, potentially leading to data theft or corruption. This is not just a casual mishap; it could pave the way for severe security breaches in applications relying on Wasmtime.

Put simply

Think of it like a mischievous guest at a hotel who finds a way to access the penthouse suite simply by manipulating their room key — suddenly, they can rummage through other guests' valuables! This vulnerability stems from the code generator Cranelift mistakenly calculating a 35-bit effective address instead of the defined 33-bit. This miscalculation allows WebAssembly controlled load/store operations to access an excessive address space beyond intended boundaries.

What to do

An attacker could exploit this vulnerability to access and modify memory that belongs to other WebAssembly instances, potentially leading to data theft or corruption. This is not just a casual mishap; it could pave the way for severe security breaches in applications relying on Wasmtime. Upgrade Wasmtime to versions 4.0.1, 5.0.1, or 6.0.1 immediately to address this critical vulnerability. If an update isn't feasible, consider enabling the `Config::static_memory_maximum_size(0)` for bounds checks, or the `Config::static_memory_guard_size(1 << 36)` for extra guard pages to mitigate the issue. You've got this! Follow these steps to secure your Wasmtime environment and keep your applications safe. 🛡️

The record
Technical detail
CVSS v3.1
10.0 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.01251 · 69.2th percentile
Weaknesses
CWE-125 · Out-of-bounds Read; CWE-787 · Out-of-bounds Write
Published
2023-03-08T19:59Z
EPSS history
Timeline
  • 08 MAR 19:59Z
    Guest-controlled out-of-bounds read/write on x86_64 in wasmtime
    cvelistv5