GHSA-5fhj-g3p3-pq9g · Severity: medium · Ecosystem: rust — Wasmtime vulnerable to Use After Free with `externref`s
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.
Conclusion & alert: CVE-2022-31146 is rated Moderate Risk (44.5/100): CVSS Medium severity, with medium exploitation likelihood (EPSS 0.86%). 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.
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-25 | 0.76% | 0.86% | +0.09% |
| 2 | 2026-06-10 | 0.41% | 0.76% | +0.35% |
| 3 | 2026-06-01 | — | 0.41% | — |
Full EPSS history (17 records total)
CVSS metrics for this CVE.
| Base score | Version | Severity | Vector | Exploitability | Impact | Score source |
|---|---|---|---|---|---|---|
| 6.4 | 3.1 | MEDIUM |
|
1.6 | 4.7 | [email protected] |
| 8.8 | 3.1 | HIGH |
|
2.8 | 5.9 | [email protected] |
GHSA-5fhj-g3p3-pq9g · Severity: medium · Ecosystem: rust — Wasmtime vulnerable to Use After Free with `externref`s
| vendor | priority | summary | link |
|---|---|---|---|
debian
|
unimportant | CVE-2022-31146 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-31146 |
ubuntu
|
medium | CVE-2022-31146 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-31146 |
| Vendor | Product | Version | Raw CPE |
|---|---|---|---|
| bytecodealliance | cranelift-codegen | >= 0.84.0, < 0.85.2 | cpe:2.3:a:bytecodealliance:cranelift-codegen:*:*:*:*:*:rust:*:* |
| bytecodealliance | wasmtime | >= 0.37.0, < 0.38.2 | cpe:2.3:a:bytecodealliance:wasmtime:*:*:*:*:*:rust:*:* |
| URL | Tags |
|---|---|
| https://github.com/WebAssembly/reference-types | Third Party Advisory |
| https://github.com/bytecodealliance/wasmtime/ | Product Third Party Advisory |
| https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-5fhj-g3p3-pq9g | Mitigation Third Party Advisory |