9.8

CVE-2022-39394: bytecodealliance wasmtime Out-of-bounds Write

CVSS: 9.8v3.1CriticalModified
AliasesUBUNTU-CVE-2022-39394GHSA-h84q-m8rr-3v9qRUSTSEC-2022-0097
Published 10-11-2022Last modified 23-04-2025

Vulnerability summary

CVE-2022-39394 is a critical (CVSS 9.8) Out-of-bounds Write vulnerability in bytecodealliance wasmtime. EPSS estimates a 0.35% chance of exploitation in the next 30 days, higher than 27.7% of scored vulnerabilities.

Overall risk
70/100
0100
High · default modelHow is this calculated?
CVSS score
9.8/10
010
Critical · v3.1 (NVD)
EPSS score
0.35%
0%100%
Low · +0.01 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 C API implementation where the definition of the `wasmtime_trap_code` does not match its declared signature in the `wasmtime/trap.h` header file. This discrepancy causes the function implementation to perform a 4-byte write into a 1-byte buffer provided by the caller. This can lead to three zero bytes being written beyond the 1-byte location provided by the caller. This bug has been patched and users should upgrade to Wasmtime 2.0.2. This bug can be worked around by providing a 4-byte buffer casted to a 1-byte buffer when calling `wasmtime_trap_code`. Users of the `wasmtime` crate are not affected by this issue, only users of the C API function `wasmtime_trap_code` are affected.

CVSS metrics

4 scores · 4 sources · 1 version

EPSS trend

Probability

0.35%

Chance of exploitation in the next 30 days

Percentile

28%

Versus all other CVEs

30-day change

+0.01 pp

From 0.34% on 20-09-2026

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

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