Home / bytecodealliance / wasmtime / CVE-2022-39394
CVE-2022-39394: is it exploited, and which versions of bytecodealliance wasmtime are affected and fixed?
CVE-2022-39394 is an out-of-bounds write (memory corruption) vulnerability in bytecodealliance wasmtime. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 13:38 UTC). Affected: wasmtime from 2.0.0 before 2.0.2 and wasmtime before 1.0.2 (GitHub advisory GHSA-h84q-m8rr-3v9q). Fixed in 2.0.2 and 1.0.2 (GitHub advisory GHSA-h84q-m8rr-3v9q). Severity: Low (3.8, CVSS 3.1, from GitHub_M).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 13:38 UTC, CVE record November 19, 2026, 07:14 UTC and NVD November 19, 2026, 07:44 UTC.
What is CVE-2022-39394?
wasmtime_trap_code C API function has out of bounds write vulnerability
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.
From the CVE record by GitHub_M, last updated April 23, 2025, 16:39 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| bytecodealliance | wasmtime | < 2.0.2 |
As the CVE record by GitHub_M states it, last updated April 23, 2025. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| crates.io | wasmtime | >= 2.0.0, < 2.0.2 | 2.0.2 | GHSA-h84q-m8rr-3v9q |
| crates.io | wasmtime | < 1.0.2 | 1.0.2 | GHSA-h84q-m8rr-3v9q |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated May 2, 2025. Summary: wasmtime_trap_code C API function has out of bounds write vulnerability.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| bytecodealliance | wasmtime | before 1.0.2 | application |
| bytecodealliance | wasmtime | from 2.0.0 before 2.0.2 | application |
NVD analysis (status Modified), last modified June 17, 2026, 04:58 UTC.
How severe is CVE-2022-39394?
| Score | Version | Vector | Source |
|---|---|---|---|
| Low 3.8 | CVSS 3.1 | CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:L | GitHub_M |
| Critical 9.8 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2022-39394 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: none; automatable: no; technical impact: partial (CISA ADP, April 23, 2025)
- EPSS
- 0.43% probability of exploitation activity in the next 30 days, percentile 39.4 (FIRST EPSS, scores of December 2, 2026)
What kind of flaw is it?
- CWE-787 Out-of-bounds Write
Where are the vendor advisories and references?
- https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-h84q-m8rr-3v9q
- https://github.com/bytecodealliance/wasmtime/commit/087d9d7becf7422b3f872a3bcd5d97bb7ce7ff36
When was it published, and where is the official record?
- Reserved
- September 2, 2022
- Published
- November 10, 2022, 00:00 UTC
- CVE record updated
- April 23, 2025, 16:39 UTC by GitHub_M
- NVD
- Modified, last modified June 17, 2026, 04:58 UTC
- Last checked
- CVE list November 19, 2026, 07:14 UTC; NVD November 19, 2026, 07:44 UTC; KEV December 3, 2026, 13:38 UTC; EPSS December 2, 2026
- Official record
- cve.org · NVD
What other CVEs affect wasmtime?
- Dec 1, 2026CVE-2026-140414 bytecodealliance wasmtime: reachable assertion (crash)
- Dec 1, 2026CVE-2026-140415 bytecodealliance wasmtime: denial of service (uncontrolled resource consumption)
- Dec 1, 2026CVE-2026-140416 bytecodealliance wasmtime: reachable assertion (crash)
- Dec 1, 2026CVE-2026-140417 bytecodealliance wasmtime: reachable assertion (crash)
- Dec 1, 2026CVE-2026-140418 bytecodealliance wasmtime: reachable assertion (crash)
- Dec 1, 2026CVE-2026-140419 bytecodealliance wasmtime: out-of-bounds read
- Dec 1, 2026CVE-2026-140420 bytecodealliance wasmtime: denial of service (resources allocated without limits)
- Dec 1, 2026CVE-2026-140421 bytecodealliance wasmtime: improper Validation of Specified Type of Input
Questions about CVE-2022-39394
Is CVE-2022-39394 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 13:38 UTC. FIRST's EPSS gives it a 0.43% chance of exploitation activity in the next 30 days (scores of December 2, 2026).
Which versions of bytecodealliance wasmtime are affected by CVE-2022-39394?
wasmtime from 2.0.0 before 2.0.2 and wasmtime before 1.0.2, per the GitHub advisory GHSA-h84q-m8rr-3v9q. The tables above give every range the sources list.
Which version fixes CVE-2022-39394?
2.0.2 and 1.0.2, per the GitHub advisory GHSA-h84q-m8rr-3v9q. Check the vendor's advisory before you rely on it.
How severe is CVE-2022-39394?
Low (3.8, CVSS 3.1, from GitHub_M). The severity table above shows each score with its source.
Where is the official record of CVE-2022-39394?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.