CVE-2022-31169

Cranelift vulnerable to miscompilation of constant values in division on AArch64

Description

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.

Category

5.9
CVSS
Severity: Medium
CVSS 3.1 •
EPSS 0.14%
Third-Party Advisory github.com Third-Party Advisory github.com
Affected: bytecodealliance wasmtime
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2022-31169?
CVE-2022-31169 has been scored as a medium severity vulnerability.
How to fix CVE-2022-31169?
To fix CVE-2022-31169, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2022-31169 being actively exploited in the wild?
As for now, there are no information to confirm that CVE-2022-31169 is being actively exploited. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2022-31169?
CVE-2022-31169 affects bytecodealliance wasmtime.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.