Skip to content
Heist/ feed
Back to feed
Critical

Wasmtime miscompiled guest heap access enables sandbox escape on aarch64 Cranelift

Type: advisorySources: OSV

Wasmtime is a runtime for WebAssembly. From 32.0.0 to before 36.0.7, 42.0.2, and 43.0.1, Wasmtime'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. This vulnerability has a few ingredients, all of which must be met, for this situation to occur and bypass the sandbox restrictions. 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. 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. The 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 maske

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-34971
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 19:17 UTC · Revision 1

Source evidence

Wasmtime miscompiled guest heap access enables sandbox escape on aarch64 Cranelift

core-osv · Original source

Published 9 Apr 2026, 18:45 UTC

Wasmtime is a runtime for WebAssembly. From 32.0.0 to before 36.0.7, 42.0.2, and 43.0.1, Wasmtime'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. This vulnerability has a few ingredients, all of which must be met, for this situation to occur and bypass the sandbox restrictions. 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. 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. The 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 maske

osv:CVE-2026-34971
Complete source record
{
  "id": "6cb664439102b3eb6e8373d3a9e2644028233c64252750fb4a4e2b992bbf30d0",
  "url": "https://osv.dev/vulnerability/CVE-2026-34971",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Wasmtime miscompiled guest heap access enables sandbox escape on aarch64 Cranelift",
    "summary": "Wasmtime is a runtime for WebAssembly. From 32.0.0 to before 36.0.7, 42.0.2, and 43.0.1, Wasmtime'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. This vulnerability has a few ingredients, all of which must be met, for this situation to occur and bypass the sandbox restrictions. 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. 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. The 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 maske",
    "evidence": "osv:CVE-2026-34971",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2026-34971",
      "aliases": [
        "CVE-2026-34971",
        "GHSA-jhxm-h53p-jm7w",
        "RUSTSEC-2026-0096"
      ],
      "metrics": [
        {
          "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": [
        {
          "ranges": [
            {
              "repo": "https://github.com/bytecodealliance/wasmtime",
              "type": "GIT",
              "events": [
                {
                  "introduced": "d3054950c67c340491f4f48021e58c11002e7513"
                },
                {
                  "fixed": "09539085b9b514b65d5c51e2905dc38f6eb414b9"
                },
                {
                  "introduced": "7b3d6ae79e9153a2477668062f5622c10333925f"
                },
                {
                  "fixed": "403f9929d4e13ed87c76471d4f4bc8d381c876eb"
                },
                {
                  "introduced": "be23469ece57c0be64904f12111c8d808b0ce4ac"
                },
                {
                  "last_affected": "be23469ece57c0be64904f12111c8d808b0ce4ac"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:bytecodealliance:wasmtime:*:*:*:*:*:rust:*:*",
                    "range": [
                      {
                        "introduced": "32.0.0"
                      },
                      {
                        "fixed": "36.0.7"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:bytecodealliance:wasmtime:*:*:*:*:*:rust:*:*",
                    "range": [
                      {
                        "introduced": "37.0.0"
                      },
                      {
                        "fixed": "42.0.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:bytecodealliance:wasmtime:43.0.0:*:*:*:*:rust:*:*",
                    "range": [
                      {
                        "introduced": "43.0.0"
                      },
                      {
                        "last_affected": "43.0.0"
                      }
                    ],
                    "source": "CPE_STRING"
                  }
                ]
              }
            }
          ],
          "versions": [
            "43.0.0",
            "v43.0.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-34971.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:38.752481502Z",
      "provider": "osv",
      "references": [
        "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-34971.json",
        "https://access.redhat.com/security/cve/CVE-2026-34971",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/34xxx/CVE-2026-34971.json",
        "https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-jhxm-h53p-jm7w",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-34971",
        "https://bugzilla.redhat.com/show_bug.cgi?id=2457008"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-125",
          "CWE-787"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/34xxx/CVE-2026-34971.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-34971",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 506076,
  "published_at": "2026-04-09T18:45:44.819+00:00"
}