CVE-2026-34971: Wasmtime Miscompiled Guest Heap Access Enables Vulnerability
CRITICALCVE-2026-34971 is a CRITICAL (CVSS 7.8) miscompiled guest heap access enables vulnerability (CWE-125: Out-of-bounds Read) affecting Wasmtime libraries in the crates.io ecosystem. The issue involves miscompiled guest heap access enables sandbox escape on aarch64 cranelift. Remediation is available by upgrading affected packages to version 36.0.7, 42.0.2, 43.0.1.
CVE-2026-34971 at a Glance
Security Impact
CVSS: 7.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H).
How to Fix CVE-2026-34971
To remediate this vulnerability, upgrade all affected Wasmtime dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade wasmtime to 36.0.7
Upgrade wasmtime to 42.0.2
Upgrade wasmtime to 43.0.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for wasmtime
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-34971, inspect your project dependencies for Wasmtime:
inspect dependencies for wasmtime
Analyze the terminal output to locate any version of Wasmtime in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 36.0.7), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-125: Out-of-bounds Read, where the product reads data past the end, or before the beginning, of the intended buffer. In Wasmtime, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-34971 Affected Wasmtime Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
wasmtime
|
crates.io |
≥ 32.0.0
< 36.0.7
|
36.0.7
|
|
wasmtime
|
crates.io |
≥ 37.0.0
< 42.0.2
|
42.0.2
|
|
wasmtime
|
crates.io |
≥ 43.0.0
< 43.0.1
All 1 versions
43.0.0
|
43.0.1
|
References
Frequently Asked Questions
What is CVE-2026-34971?
Which Wasmtime versions are affected?
What version fixes CVE-2026-34971?
Is wasmtime affected?
What is the CVSS score of CVE-2026-34971?
What CWE is associated with CVE-2026-34971?
How can I check crates.io dependencies for CVE-2026-34971?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jhxm-h53p-jm7w",
"modified" : "2026-04-15T20:55:38Z",
"published" : "2026-04-09T20:23:26Z",
"aliases" : [ "CVE-2026-34971" ],
"summary" : "Wasmtime: Miscompiled guest heap access enables sandbox escape on aarch64 Cranelift",
"details" : "### Impact\n\nWasmtime's Cranelift compilation backend contains a bug on aarch64 when performing a certain shape of heap accesses which means that the wrong address is accessed. When combined with explicit bounds checks a guest WebAssembly module this can create a situation where there are two diverging computations for the same address: one for the address to bounds-check and one for the address to load. This difference in address being operated on means that a guest module can pass a bounds check but then load a different address. Combined together this enables an arbitrary read/write primitive for guest WebAssembly when accesssing host memory. This is a sandbox escape as guests are able to read/write arbitrary host memory.\n\nThis vulnerability has a few ingredients, all of which must be met, for this situation to occur and bypass the sandbox restrictions:\n\n* This miscompiled shape of load only occurs on 64-bit WebAssembly linear memories, or when `Config::wasm_memory64` is enabled. 32-bit WebAssembly is not affected.\n* Spectre mitigations or signals-based-traps must be disabled. When spectre mitigations are enabled then the offending shape of load is not generated. When signals-based-traps are disabled then spectre mitigations are also automatically disabled.\n\nThe specific bug in Cranelift is a miscompile of a load of the shape `load(iadd(base, ishl(index, amt)))` where `amt` is a constant. The `amt` value is masked incorrectly to test if it's a certain value, and this incorrect mask means that Cranelift can pattern-match this lowering rule during instruction selection erroneously, diverging from WebAssembly's and Cranelift's semantics. This incorrect lowering would, for example, load an address much further away than intended as the correct address's computation would have wrapped around to a smaller value insetad.\n\n\n\n### Patches\n\nWasmtime 36.0.7, 42.0.2, and 43.0.1 have been issued to fix this bug. Users are recommended to update to these patched versions of Wasmtime.\n\n### Workarounds\n\nThis bug only affects users of Cranelift on aarch64. Cranelift on other platforms is not affected. Additionally this only affects 64-bit WebAssembly linear memories, so if `Config::wasm_memory64` is disabled then hosts are not affected. Note that `Config::wasm_memory64` is enabled by default. If spectre mitigations are enabled, which are enabled by default, then hosts are not affected by this issue.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "wasmtime"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "32.0.0"
}, {
"fixed" : "36.0.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "wasmtime"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "37.0.0"
}, {
"fixed" : "42.0.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "wasmtime"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "43.0.0"
}, {
"fixed" : "43.0.1"
} ]
} ],
"versions" : [ "43.0.0" ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-jhxm-h53p-jm7w"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-34971"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/bytecodealliance/wasmtime"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2026-0096.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-125", "CWE-787" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-09T20:23:26Z",
"nvd_published_at" : "2026-04-09T19:16:24Z"
}
}