Cranelift vulnerable to miscompilation of constant values in division on AArch64
CVE-2022-31169GHSA-7f6x-jwh5-m9r4
What to do
Vendor fix available. Upgrade each affected package to the fixed version on its release line (cranelift-codegen 0.85.2; wasmtime 0.38.2), redeploy, then verify what is actually installed.
This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.
Affected packages
crates.io cranelift-codegen
- Affected
- < 0.85.2
- Fixed in
- 0.85.2
crates.io wasmtime
- Affected
- < 0.38.2
- Fixed in
- 0.38.2
Sources
- GitHub Advisory Database and maintainer security advisories on GitHub
GitHub-reviewed advisory GHSA-7f6x-jwh5-m9r4 lists affected ranges: crates.io wasmtime >=0 =0 <0.85.2
VerifiedObserved Structured GitHub Advisory Database record (type=reviewed) from the GitHub REST API.
Severity and exploitation
- Exploitation
- No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
- CVSS
- 5.9 · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
- EPSS
- CVE-2022-31169: 0.92% estimated exploitation activity in the next 30 days; percentile 60.45 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description
As published by the source; long descriptions are shortened.
Impact There was a bug in Wasmtime's code generator, Cranelift, for AArch64 targets where constant divisors could result in incorrect division results at runtime. 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. For example, a constant 32-bit unsigned divisor of 0xfffffffe would be incorrectly sign-extended to 64-bits to 0xfffffffffffffffe. Any kind of division of operands smaller than 64 bits is implemented with a 64-bit division instruction which would then result in an incorrect result because the divisor was larger than expected. 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…
Dates and revisions
- Published by the source
- Last modified by the source
- Source last checked
- Revision 1 · created ·
Published from ghsa record GHSA-7f6x-jwh5-m9r4
Agent brief
Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.
# Patch Next advisory brief: CVE-2022-31169 Advisory: Cranelift vulnerable to miscompilation of constant values in division on AArch64 IDs: CVE-2022-31169, GHSA-7f6x-jwh5-m9r4 Record: https://patchnext.com/advisories/cve-2022-31169 (revision 1, source checked 26 Oct 2026, 15:38 UTC) Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected. Severity: Medium (CVSS 5.9) Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV. Vendor response: Vendor fix available; fixed versions by package: cranelift-codegen 0.85.2; wasmtime 0.38.2. A vendor fix does not mean a deployment is fixed. ## Affected components - crates.io cranelift-codegen: affected < 0.85.2; fixed in 0.85.2 - crates.io wasmtime: affected < 0.38.2; fixed in 0.38.2 ## Suggested inspection (read-only) - crates.io cranelift-codegen: check the installed version with your package manager. - crates.io wasmtime: check the installed version with your package manager. ## Supported action Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version. ## Required regression checks - Run the test suite and a production build. - Exercise the features that depend on cranelift-codegen, wasmtime. - Repeat the inspection and confirm that only fixed versions remain installed. ## Rollback considerations - Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward. ## Unresolved questions - Which deployments run an affected version? - Exploitation status can change. Check again before lowering the priority. - Mark the work resolved only after the fixed version is verified in production. ## Sources - Verified: https://github.com/advisories/GHSA-7f6x-jwh5-m9r4 (GitHub-reviewed advisory GHSA-7f6x-jwh5-m9r4 lists affected ranges: crates.io wasmtime >=0 =0 <0.85.2) Commands are suggestions: review each one before running it.
Loading voting…