CVE-2022-39392
Wasmtime vulnerable to out of bounds read/write with zero-memory-pages configuration
Also known as GHSA-44mr-8vmm-wjhg, RUSTSEC-2022-0076, RUSTSEC-2022-0102
Mitigation
- Upgrade wasmtime to one of 2.0.2, 1.0.2 (or later in the same release line).
Who should check
- Projects that depend on crates.io package wasmtime (>= 2.0.0, < 2.0.2)
- Anyone running bytecodealliance wasmtime < 2.0.2
Vulnerability facts
- Affected
- wasmtime >= 2.0.0, < 2.0.2
- Fixed in
- 2.0.2, 1.0.2
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, login needed
- CVSS
- 5.9 (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: High
- Privileges required: High
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: None
- EPSS
- 0.80% chance of exploitation in 30 days (percentile 53, 2026-11-26)
- CWE
- CWE-119, CWE-125, CWE-787
- Modified
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| crates.io wasmtime | >= 2.0.0, < 2.0.2 | 2.0.2, 1.0.2 | osv |
| bytecodealliance wasmtime | < 2.0.2 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2022-39392. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2022-39392.md Affected: wasmtime >= 2.0.0, < 2.0.2 Fixed in: 2.0.2, 1.0.2 Steps: 1. Search this machine and project for wasmtime (crates.io), bytecodealliance wasmtime: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2022-39392 being exploited?
There is no confirmed exploitation: CVE-2022-39392 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.80% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2022-39392?
Medium: CVSS 5.9 (v3.1, scored by CNA). Remote, login needed. The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2022-39392?
wasmtime >= 2.0.0, < 2.0.2.
Is there a fix for CVE-2022-39392?
Yes. Fixed in 2.0.2, 1.0.2. Upgrade wasmtime to one of 2.0.2, 1.0.2 (or later in the same release line).
How do I check if I'm affected by CVE-2022-39392?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.