Security mailing lists by PureSourceCode

CVE-2022-31169

HIGH 7.5CVSS 3.1

Cranelift vulnerable to miscompilation of constant values in division on AArch64

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.

Published
22 Jul 2022
Last modified
12 Oct 2026
Assigned by
security-advisories@github.com
NVD status
Modified
Weakness
CWE-682CWE-824
Also known as
CVE-2022-23636GHSA-7f6x-jwh5-m9r4GHSA-88xq-w8cq-xfg7RUSTSEC-2022-0096RUSTSEC-2022-0101
Sources
NVDJSONOSV GHSA-7f6x-jwh5-m9r4JSONOSV GHSA-88xq-w8cq-xfg7JSONOSV RUSTSEC-2022-0096JSONOSV RUSTSEC-2022-0101JSON

Scores

SourceScored byVersionScoreVector / decision
NVD nvd@nist.gov (Primary) CVSS 3.1 HIGH 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NVD security-advisories@github.com (Secondary) CVSS 3.1 MEDIUM 5.9 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
OSV GitHub CVSS 3.1 MEDIUM 5.9 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
OSV GitHub CVSS 3.1 MEDIUM 5.1 CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD bytecodealliance cranelift-codegen
cpe:2.3:a:bytecodealliance:cranelift-codegen:*:*:*:*:*:rust:*:*
< 0.85.1 0.85.1
NVD bytecodealliance wasmtime
cpe:2.3:a:bytecodealliance:wasmtime:*:*:*:*:*:rust:*:*
< 0.38.1 0.38.1
OSV crates.io wasmtime < 0.38.2 0.38.2
OSV crates.io cranelift-codegen < 0.85.2 0.85.2
OSV crates.io wasmtime >= 0.34.0, < 0.34.1 0.34.1
OSV crates.io wasmtime < 0.33.1 0.33.1
OSV crates.io wasmtime >= 0.0.0-0, < 0.33.1; >= 0.34.0, < 0.34.1 0.33.1, 0.34.1
OSV crates.io wasmtime >= 0.0.0-0, < 0.38.2 0.38.2

References

History

  • 25 Nov 2026 20:34 UTC · NVD: first stored (published 22 Jul 2022)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 17 Feb 2022)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 5 Jul 2022)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 16 Feb 2022)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 21 Jul 2022)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.