CVE-2023-26489
Guest-controlled out-of-bounds read/write on x86_64 in wasmtime
Also known as GHSA-ff4p-7xrq-q5r8, RUSTSEC-2023-0090
Mitigation
- Upgrade wasmtime to one of 4.0.1, 5.0.1, 6.0.1 (or later in the same release line).
- Upgrade cranelift-codegen to one of 0.91.1, 0.92.1, 0.93.1 (or later in the same release line).
Who should check
- Projects that depend on crates.io package wasmtime (>= 0.37.0, < 4.0.1)
- Projects that depend on crates.io package cranelift-codegen (>= 0.84.0, < 0.91.1)
- Anyone running bytecodealliance wasmtime cranelift-codegen: >= 0.84.0, < 0.91.1; cranelift-codegen: >= 0.92.0, < 0.92.1; cranelift-codegen: >= 0.93.0, < 0.93.1; wasmtime: >= 0.37.0, < 4.0.1; wasmtime: >= 5.0.0, < 5.0.1; wasmtime: >= 6.0.0, < 6.0.1
Vulnerability facts
- Affected
- wasmtime >= 0.37.0, < 4.0.1; cranelift-codegen >= 0.84.0, < 0.91.1
- Fixed in
- 4.0.1, 5.0.1, 6.0.1, 0.91.1, 0.92.1, 0.93.1
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, login needed
- CVSS
- 10.0 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Changed (impact reaches other components)
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 1.41% chance of exploitation in 30 days (percentile 73, 2026-11-26)
- CWE
- CWE-125, CWE-787
- Modified
Description
wasmtime is a fast and secure runtime for WebAssembly. In affected versions wasmtime's code generator, Cranelift, has a bug on x86_64 targets where address-mode computation mistakenly would calculate a 35-bit effective address instead of WebAssembly's defined 33-bit effective address. This bug means that, with default codegen settings, a wasm-controlled load/store operation could read/write addresses up to 35 bits away from the base of linear memory. Due to this bug, however, addresses up to `0xffffffff * 8 + 0x7ffffffc = 36507222004 = ~34G` bytes away from the base of linear memory are possible from guest code. This means that the virtual memory 6G away from the base of linear memory up to ~34G away can be read/written by a malicious module. A guest module can, without the knowledge of the embedder, read/write memory in this region. The memory may belong to other WebAssembly instances when using the pooling allocator, for example. Affected embedders are recommended to analyze preexisting wasm modules to see if they're affected by the incorrect codegen rules and possibly correlate that with an anomalous number of traps during historical execution to locate possibly suspicious modules. The specific bug in Cranelift's x86_64 backend is that a WebAssembly address which is left-shifted by a constant amount from 1 to 3 will get folded into x86_64's addressing modes which perform shifts. For example `(i32.load (i32.shl (local.get 0) (i32.const 3)))` loads from the WebAssembly address `$local0 << 3`. When translated to Cranelift the `$local0 << 3` computation, a 32-bit value, is zero-extended to a 64-bit value and then added to the base address of linear memory. Cranelift would generate an instruction of the form `movl (%base, %local0, 8), %dst` which calculates `%base + %local0 << 3`. The bug here, however, is that the address computation happens with 64-bit values, where the `$local0 << 3` computation was supposed to be truncated to a a 32-bit value. This means that `%local0`, which can use up to 32-bits for an address, gets 3 extra bits of address space to be accessible via this `movl` instruction. The fix in Cranelift is to remove the erroneous lowering rules in the backend which handle these zero-extended expression. The above example is then translated to `movl %local0, %temp; shl $3, %temp; movl (%base, %temp), %dst` which correctly truncates the intermediate computation of `%local0 << 3` to 32-bits inside the `%temp` register which is then added to the `%base` value. Wasmtime version 4.0.1, 5.0.1, and 6.0.1 have been released and have all been patched to no longer contain the erroneous lowering rules. While updating Wasmtime is recommended, there are a number of possible workarounds that embedders can employ to mitigate this issue if updating is not possible. Note that none of these workarounds are on-by-default and require explicit configuration: 1. The `Config::static_memory_maximum_size(0)` option can be used to force all accesses to linear memory to be explicitly bounds-checked. This will perform a bounds check separately from the address-mode computation which correctly calculates the effective address of a load/store. Note that this can have a large impact on the execution performance of WebAssembly modules. 2. The `Config::static_memory_guard_size(1 << 36)` option can be used to greatly increase the guard pages placed after linear memory. This will guarantee that memory accesses up-to-34G away are guaranteed to be semantically correct by reserving unmapped memory for the instance. Note that this reserves a very large amount of virtual memory per-instances and can greatly reduce the maximum number of concurrent instances being run. 3. If using a non-x86_64 host is possible, then that will also work around this bug. This bug does not affect Wasmtime's or Cranelift's AArch64 backend, for example.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| crates.io wasmtime | >= 0.37.0, < 4.0.1 | 4.0.1, 5.0.1, 6.0.1 | osv |
| crates.io cranelift-codegen | >= 0.84.0, < 0.91.1 | 0.91.1, 0.92.1, 0.93.1 | osv |
| bytecodealliance wasmtime | cranelift-codegen: >= 0.84.0, < 0.91.1; cranelift-codegen: >= 0.92.0, < 0.92.1; cranelift-codegen: >= 0.93.0, < 0.93.1; wasmtime: >= 0.37.0, < 4.0.1; wasmtime: >= 5.0.0, < 5.0.1; wasmtime: >= 6.0.0, < 6.0.1 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2023-26489. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2023-26489.md Affected: wasmtime >= 0.37.0, < 4.0.1; cranelift-codegen >= 0.84.0, < 0.91.1 Fixed in: 4.0.1, 5.0.1, 6.0.1, 0.91.1, 0.92.1, 0.93.1 Steps: 1. Search this machine and project for wasmtime (crates.io), cranelift-codegen (crates.io), bytecodealliance wasmtime: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2023-26489 being exploited?
There is no confirmed exploitation: CVE-2023-26489 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.41% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2023-26489?
Critical: CVSS 10.0 (v3.1, scored by CNA). Remote, login needed.
Which versions are affected by CVE-2023-26489?
wasmtime >= 0.37.0, < 4.0.1; cranelift-codegen >= 0.84.0, < 0.91.1.
Is there a fix for CVE-2023-26489?
Yes. Fixed in 4.0.1, 5.0.1, 6.0.1, 0.91.1, 0.92.1, 0.93.1. Upgrade wasmtime to one of 4.0.1, 5.0.1, 6.0.1 (or later in the same release line). Upgrade cranelift-codegen to one of 0.91.1, 0.92.1, 0.93.1 (or later in the same release line).
How do I check if I'm affected by CVE-2023-26489?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.