CVE-2022-31169: bytecodealliance wasmtime Incorrect Calculation
Vulnerability summary
CVE-2022-31169 is a medium (CVSS 5.9) Incorrect Calculation vulnerability in bytecodealliance wasmtime. EPSS estimates a 0.92% chance of exploitation in the next 30 days, higher than 59.8% of scored vulnerabilities.
Timeline
- 21-07-2022PublishedVulnerability first disclosed.
- 23-04-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
2 scores · 2 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
EPSS trend
Probability
0.92%
Chance of exploitation in the next 30 days
Percentile
60%
Versus all other CVEs
30-day change
+0.03 pp
From 0.90% on 20-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Ubuntu6 products
- mozjs38All versions (No fix recorded)
- mozjs52All versions (No fix recorded)
- mozjs68All versions (No fix recorded)
- mozjs78All versions (No fix recorded)
- mozjs91All versions (No fix recorded)
Bytecodealliance1 product
- wasmtime< 0.38.2 | < 0.85.2
2 vendors · 7 products
References
4 links- github.com/bytecodealliance/wasmtime/security/advisories/GHSA-7f6x-jwh5-m9r4X Refsource CONFIRMREPORT
- github.com/bytecodealliance/wasmtime/commit/2ba4bce5cc719e5a74e571a534424614e62ecc41X Refsource MISCREPORT