7.4

CVE-2022-39392: bytecodealliance wasmtime

CVSS: 7.4v3.1HighModified
AliasesUBUNTU-CVE-2022-39392GHSA-44mr-8vmm-wjhgRUSTSEC-2022-0076
Published 10-11-2022Last modified 23-04-2025

Vulnerability summary

CVE-2022-39392 is a high (CVSS 7.4) vulnerability in bytecodealliance wasmtime. EPSS estimates a 0.66% chance of exploitation in the next 30 days, higher than 50.8% of scored vulnerabilities.

Overall risk
30/100
0100
Medium · default modelHow is this calculated?
CVSS score
7.4/10
010
High · v3.1 (NVD)
EPSS score
0.66%
0%100%
Low · +0.04 pp in 30 days
KEVNot listedIn no KEV catalog
RansomwareNone recordedNo known use recorded
Public exploits0No public exploits recorded

Timeline

  1. 10-11-2022
    PublishedVulnerability first disclosed.
  2. 23-04-2025
    Last modifiedVulnerability information updated.

Description

Wasmtime is a standalone runtime for WebAssembly. Prior to version 2.0.2, there is a bug in Wasmtime's implementation of its pooling instance allocator when the allocator is configured to give WebAssembly instances a maximum of zero pages of memory. In this configuration, the virtual memory mapping for WebAssembly memories did not meet the compiler-required configuration requirements for safely executing WebAssembly modules. Wasmtime's default settings require virtual memory page faults to indicate that wasm reads/writes are out-of-bounds, but the pooling allocator's configuration would not create an appropriate virtual memory mapping for this meaning out of bounds reads/writes can successfully read/write memory unrelated to the wasm sandbox within range of the base address of the memory mapping created by the pooling allocator. This bug is not applicable with the default settings of the `wasmtime` crate. This bug can only be triggered by setting `InstanceLimits::memory_pages` to zero. This is expected to be a very rare configuration since this means that wasm modules cannot allocate any pages of linear memory. All wasm modules produced by all current toolchains are highly likely to use linear memory, so it's expected to be unlikely that this configuration is set to zero by any production embedding of Wasmtime. This bug has been patched and users should upgrade to Wasmtime 2.0.2. This bug can be worked around by increasing the `memory_pages` allotment when configuring the pooling allocator to a value greater than zero. If an embedding wishes to still prevent memory from actually being used then the `Store::limiter` method can be used to dynamically disallow growth of memory beyond 0 bytes large. Note that the default `memory_pages` value is greater than zero.

CVSS metrics

4 scores · 4 sources · 1 version

EPSS trend

Probability

0.66%

Chance of exploitation in the next 30 days

Percentile

51%

Versus all other CVEs

30-day change

+0.04 pp

From 0.63% on 20-09-2026

20-09-202620-10-2026
EPSS score
0.66%

Known exploited

Compare KEV catalogs

Not in any of the 3 tracked catalogs.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Ubuntu6 products
  • mozjs38All versions (No fix recorded)
  • mozjs52All versions (No fix recorded)
  • mozjs68All versions (No fix recorded)
  • mozjs78All versions (No fix recorded)
  • mozjs91All versions (No fix recorded)
Bytecodealliance1 product
  • wasmtime< 2.0.2 | < 1.0.2 | ≥ 2.0.0, < 2.0.2
Crates.Io1 product
  • wasmtime< 1.0.2 | ≥ 2.0.0, < 2.0.2

3 vendors · 8 products

References

10 links