LiveActive security incident?Get immediate response
CVE Record

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.

MediumCVSS 5.9Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

This is a correctness flaw in Wasmtime's Cranelift compiler on AArch64 systems. Under certain WebAssembly division operations using constant divisors, guest programs can calculate wrong results. Sources describe impact to WebAssembly guest behavior, not host compromise. Organizations using affected Wasmtime or Cranelift versions on ARM64 should upgrade affected runtime paths.

Executive priority

Handle as a targeted moderate integrity risk, not a broad emergency. Upgrade any AArch64 Wasmtime or Cranelift deployments where WebAssembly output affects security, financial, operational, or customer-facing decisions. Lower priority is reasonable for environments not using AArch64 or not using these components.

Technical view

Cranelift's AArch64 lowering for constant divisors mishandled sign or zero extension, placing an incorrect constant into a register during division. Affected versions are Wasmtime before 0.38.2 and cranelift-codegen before 0.85.2. The flaw is CWE-682 with CVSS 5.9, integrity impact high, and attack complexity high.

Likely exposure

Exposure is limited to deployments executing WebAssembly with Wasmtime or Cranelift on AArch64. Other platforms are not affected according to the source bundle. Risk is most relevant where guest WebAssembly correctness affects decisions, calculations, policy checks, or customer-visible output.

Exploitation context

The source bundle does not show active exploitation, and the CVE is not marked KEV. The issue can cause incorrect guest execution results, but sources do not describe a sandbox escape or host compromise. Exploitability is described indirectly by CVSS as network reachable but high complexity.

Researcher notes

The key question is whether untrusted or semi-trusted WebAssembly runs through affected Cranelift AArch64 code generation. The advisory frames impact as guest program misbehavior relative to the WebAssembly specification, with no expected host impact. Evidence for exploitation or workaround guidance is absent in the provided sources.

Mitigation direction

  • Upgrade Wasmtime to version 0.38.2 or later.
  • Upgrade cranelift-codegen to version 0.85.2 or later.
  • Prioritize AArch64 runtime environments before non-AArch64 systems.
  • Check Bytecode Alliance advisory for any updated vendor guidance.
  • Treat no-workaround status as an upgrade requirement.

Validation and detection

  • Inventory Wasmtime and cranelift-codegen versions in production and build systems.
  • Identify whether affected services run on AArch64 hosts.
  • Confirm upgraded dependencies resolve to Wasmtime 0.38.2 or cranelift-codegen 0.85.2 or later.
  • Run application regression tests covering WebAssembly division and policy-sensitive calculations.
  • Document non-AArch64 deployments as not affected by this CVE.
Prepared
Confidence
high
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-682: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2022-31169 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
5.9 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
3Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
5.9CVSS 3.1MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N2.23.6Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

5.9Medium
CVSS 3.1 vector shape for CVE-2022-31169Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
bytecodealliancewasmtime< 0.38.2, < 0.85.2Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-682 · source CWE mapping

Incorrect Calculation

Incorrect Calculation represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.