CVE-2022-31169 | 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: 2022-07-22 Last update: 2026-06-17 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2022-31169 is rated Moderate Risk (40/100): CVSS Medium severity, with low exploitation likelihood (EPSS 0.65%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2022-31169

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 0.43% 0.65% +0.23%
2 2026-06-01 0.29% 0.43% +0.13%
3 2026-01-08 0.29%

Full EPSS history (11 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2022-31169

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
5.9 3.1 MEDIUM
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
2.2 3.6 [email protected]
7.5 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
3.9 3.6 [email protected]

Weakness enumeration for CVE-2022-31169

GitHub Security Advisory for CVE-2022-31169

GHSA-7f6x-jwh5-m9r4 · Severity: medium · Ecosystem: rust — Cranelift vulnerable to miscompilation of constant values in division on AArch64

OS Trackers for CVE-2022-31169

vendor priority summary link
debian unimportant CVE-2022-31169 unimportant priority: Debian including 1 source packages (rust-wasmtime), 3 status rows across 3 suites (forky, sid, trixie): resolved 3. https://security-tracker.debian.org/tracker/CVE-2022-31169
ubuntu medium CVE-2022-31169 medium priority: Ubuntu including 7 source packages (firefox, mozjs38, …), 70 status rows across 10 suites (bionic, focal, jammy, kinetic, lunar, mantic, noble, trusty, upstream, xenial): DNE 41, ignored 22, not-affected 5, needs-triage 2. https://ubuntu.com/security/CVE-2022-31169

Affected software / configurations for CVE-2022-31169

Vendor Product Version Raw CPE
bytecodealliance cranelift-codegen < 0.85.1 cpe:2.3:a:bytecodealliance:cranelift-codegen:*:*:*:*:*:rust:*:*
bytecodealliance wasmtime < 0.38.1 cpe:2.3:a:bytecodealliance:wasmtime:*:*:*:*:*:rust:*:*

References for CVE-2022-31169

cvelogic Threat Intelligence