CVE-2022-39394: bytecodealliance wasmtime Out-of-bounds Write
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.
Timeline
- 10-11-2022PublishedVulnerability first disclosed.
- 23-04-2025Last 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- CVE.orgCNA3.8LowCVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:LDiffers
- OSV · UbuntuEcosystem advisory · calculated3.8LowCVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:LDiffers
- OSV · Crates.ioEcosystem advisory · calculated3.8LowCVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:LDiffers
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
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected 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- github.com/bytecodealliance/wasmtime/security/advisories/GHSA-h84q-m8rr-3v9qREPORTWEBThird Party Advisory
- github.com/bytecodealliance/wasmtime/commit/087d9d7becf7422b3f872a3bcd5d97bb7ce7ff36REPORTWEBPatchThird Party Advisory
- crates.io/crates/wasmtimePACKAGE