Read the docs
TI-2022-13211 Aliases CVE-2022-31169GHSA-7f6x-jwh5-m9r4

Cranelift vulnerable to miscompilation of constant values in division on AArch64

Priority LOW 35CWE-682Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
—
Confidentiality · integrity · availability
None · High · None
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub.

Summary

Wasmtime is a standalone runtime for WebAssembly. There is a bug in Wasmtime's code generator, Cranelift, for AArch64 targets where constant divisors can result in incorrect division results at runtime. This affects Wasmtime prior to version 0.38.2 and Cranelift prior to 0.85.2. This issue only affects the AArch64 platform. Other platforms are not affected. The translation rules for constants did not take into account whether sign or zero-extension should happen which resulted in an incorrect value being placed into a register when a division was encountered. The impact of this bug is that programs executing within the WebAssembly sandbox would not behave according to the WebAssembly specification. This means that it is hypothetically possible for execution within the sandbox to go awry and WebAssembly programs could produce unexpected results. This should not impact hosts executing WebAssembly but does affect the correctness of guest programs. This bug has been patched in Wasmtime version 0.38.2 and cranelift-codegen 0.85.2. There are no known workarounds.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00924 60th percentileScored 2026-11-08
Fix Fixed wasmtime (bytecodealliance): 0.38.2, 0.85.2wasmtime (crates.io): 0.38.2+1 more product

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
bytecodealliancewasmtimebefore 0.38.2; before 0.85.20.38.2, 0.85.2Patch availableCNA
—wasmtime (crates.io)before 0.38.20.38.2Patch availableGHSA-7f6x-jwh5-m9r4
—cranelift-codegen (crates.io)before 0.85.20.85.2Patch availableGHSA-7f6x-jwh5-m9r4
  • wasmtime Vendorbytecodealliance Affected before 0.38.2; before 0.85.2 Fixed in 0.38.2, 0.85.2 Patch available CNA
  • wasmtime (crates.io) Vendor— Affected before 0.38.2 Fixed in 0.38.2 Patch available GHSA-7f6x-jwh5-m9r4
  • cranelift-codegen (crates.io) Vendor— Affected before 0.85.2 Fixed in 0.85.2 Patch available GHSA-7f6x-jwh5-m9r4

CPE configurations NVD · 2

CPEVersionsRoleVendor
cpe:2.3:a:bytecodealliance:cranelift-codegen:*:*:*:*:*:rust:*:*before 0.85.1Vulnerablebytecodealliance
cpe:2.3:a:bytecodealliance:wasmtime:*:*:*:*:*:rust:*:*before 0.38.1Vulnerablebytecodealliance
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:*:*:*:*:*:rust:*:* Versions before 0.85.1 Vulnerable ·bytecodealliance
  • cpe:2.3:a:bytecodealliance:wasmtime:*:*:*:*:*:rust:*:* Versions before 0.38.1 Vulnerable ·bytecodealliance

Remediation

  • Fix · CNA wasmtime (bytecodealliance) Fixed in 0.38.2, 0.85.2
  • Fix · GHSA-7f6x-jwh5-m9r4 wasmtime (crates.io) Fixed in 0.38.2 Advisory →
  • Fix · GHSA-7f6x-jwh5-m9r4 cranelift-codegen (crates.io) Fixed in 0.85.2 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2022-31169
  2. 2026-10-03 Alias added: GHSA-7f6x-jwh5-m9r4

References

  • TI-2023-11636 Guest-controlled out-of-bounds read/write on x86_64 in wasmtime CVSS 3.1CRITICAL 10.0
  • TI-2022-13189 Use After Free in Wasmtime CVSS 3.1HIGH 8.8
  • TI-2021-12298 Memory access due to code generation flaw in Cranelift module CVSS 3.1HIGH 8.8
  • TI-2022-13148 Miscompilation of `i8x16.swizzle` and `select` with v128 inputs in Wasmtime CVSS 3.1MEDIUM 5.6
  • TI-2023-12205 wasmtime is a fast and secure runtime for WebAssembly. CVSS 3.1MEDIUM 4.3

Sources