> CVE-2022-31146 [MEDIUM]

« BACK_TO_HOME
PUBLISHED
2022-07-21 04:15
MODIFIED
2024-11-21 07:03
CVSS_SCORE V3
6.4
EPSS (Prob. Exploit)
1.25%
Top 30.4%
DATA SOURCES:
NVD 🔗 2025-10-18 CVE PROJECT 🔗 2026-01-19 FIRST EPSS 🔗 2026-11-08 GITHUB 🔗 2026-11-17 OSV 🔗 2026-11-15

> DESCRIPTION

Wasmtime is a standalone runtime for WebAssembly. There is a bug in the Wasmtime's code generator, Cranelift, where functions using reference types may be incorrectly missing metadata required for runtime garbage collection. This means that if a GC happens at runtime then the GC pass will mistakenly think these functions do not have live references to GC'd values, reclaiming them and deallocating them. The function will then subsequently continue to use the values assuming they had not been GC'd, leading later to a use-after-free. This bug was introduced in the migration to the `regalloc2` register allocator that occurred in the Wasmtime 0.37.0 release on 2022-05-20. This bug has been patched and users should upgrade to Wasmtime version 0.38.2. Mitigations for this issue can be achieved by disabling the reference types proposal by passing `false` to `wasmtime::Config::wasm_reference_types` or downgrading to Wasmtime 0.36.0 or prior.

> AFFECTED_PRODUCTS

Bytecodealliance - Cranelift Codegen
>= 0.84.0 < 0.85.2
Bytecodealliance - Wasmtime
>= 0.37.0 < 0.38.2

> CVSS V3 METRICS

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

> MÉTRIQUES CVSS DÉTAILLÉES

CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:L
Métrique Valeur Interprétation
AV (Vecteur d'Attaque)
Attack Vector
Network (N)
Exploit possible à distance via réseau (HTTP, API, etc.)
AC (Complexité d'Attaque)
Attack Complexity
High (H)
Conditions spécifiques doivent être réunies pour exploiter
PR (Privilèges Requis)
Privileges Required
Low (L)
Authentifié avec compte utilisateur basique
UI (Interaction Utilisateur)
User Interaction
None (N)
Aucune interaction utilisateur nécessaire
S (Périmètre)
Scope
Unchanged (U)
Impact reste dans le périmètre du composant compromis
C (Impact Confidentialité)
Confidentiality Impact
High (H)
Divulgation totale d'informations
I (Impact Intégrité)
Integrity Impact
Low (L)
Modification limitée des données possible
A (Impact Disponibilité)
Availability Impact
Low (L)
Interruption partielle du service possible

> RÉSUMÉ DES IMPACTS

Confidentialité
High
Divulgation totale d'informations
Intégrité
Low
Modification limitée des données possible
Disponibilité
Low
Interruption partielle du service possible

> GITHUB SECURITY ADVISORY

GHSA-5fhj-g3p3-pq9g MODERATE

Wasmtime vulnerable to Use After Free with `externref`s

AFFECTED PACKAGES:
RUST / cranelift-codegen
>= 0.84.0, < 0.85.2
Fixed in: 0.85.2
RUST / wasmtime
>= 0.37.0, < 0.38.2
Fixed in: 0.38.2

> OSV (GOOGLE OPEN SOURCE VULNERABILITIES)

Use After Free in Wasmtime

AFFECTED PACKAGES:
Unknown / Unknown
ALIASES:
GHSA-5fhj-g3p3-pq9g, RUSTSEC-2022-0100

> HISTORIQUE DES MODIFICATIONS

Première apparition
21/07/2022 04:15
Source: NVD
📊 ENRICHISSEMENT 18/10/2025 14:34
CVEPROJECT
Champ modifié: CVE Project
Ancienne valeur:
Non
Nouvelle valeur:
Oui
Total des modifications: 1 Dernière mise à jour: 1 year ago
« BACK_TO_HOME