# CVE-2026-140420: Wasmtime before 36.0.21 Unbounded Host Memory Growth via AsyncWriteStream Empty Writes

- **Severity:** MEDIUM 6.9
- **CVSS:** 6.9 (v4.0, CNA) `CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: Present; Privileges required: Low; User interaction: Passive; Confidentiality impact: None; Integrity impact: None; Availability impact: High; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.40% (percentile 36, 2026-12-03)
- **CWE:** CWE-770
- **Aliases:** GHSA-5m8g-xhq4-4h93, RUSTSEC-2026-0566
- **Published:** 2026-11-16T12:00:00.000Z
- **Modified:** 2026-12-01T16:18:20.713Z

## Who should check

- Projects that depend on crates.io package wasmtime (\>= 0.0.0-0, \< 36.0.21; \>= 37.0.0, \< 48.0.9; \>= 49.0.0, \< 49.0.6; \>= 50.0.0, \< 50.0.2)
- Anyone running bytecodealliance wasmtime \< 36.0.21
- Anyone running bytecodealliance wasmtime \>= 37.0.0, \< 48.0.9
- Anyone running bytecodealliance wasmtime \>= 49.0.0, \< 49.0.6
- Anyone running bytecodealliance wasmtime \>= 50.0.0, \< 50.0.2

## Description

wasmtime-wasi in Wasmtime before 36.0.21, 37.0.0 before 48.0.9, 49.0.0 before 49.0.6, and 50.0.0 before 50.0.2 allows unbounded host memory growth because AsyncWriteStream queues zero-length writes without charging them against its write budget. A malicious guest can repeatedly call wasi:io/streams output-stream.write with empty lists, exhausting host memory and causing denial of service.

## Affected and fixed versions

- crates.io `wasmtime`: affected \>= 0.0.0-0, \< 36.0.21; \>= 37.0.0, \< 48.0.9; \>= 49.0.0, \< 49.0.6; \>= 50.0.0, \< 50.0.2; fixed 36.0.21, 48.0.9, 49.0.6, 50.0.2 (osv)
- bytecodealliance wasmtime: \< 36.0.21 (cvelist)
- bytecodealliance wasmtime: \>= 37.0.0, \< 48.0.9 (cvelist)
- bytecodealliance wasmtime: \>= 49.0.0, \< 49.0.6 (cvelist)
- bytecodealliance wasmtime: \>= 50.0.0, \< 50.0.2 (cvelist)

## Technologies

Rust crates

## Mitigation

- Upgrade wasmtime to one of 36.0.21, 48.0.9, 49.0.6, 50.0.2 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-140420. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-140420.md
Affected: wasmtime >= 0.0.0-0, < 36.0.21; >= 37.0.0, < 48.0.9; >= 49.0.0, < 49.0.6; >= 50.0.0, < 50.0.2
Fixed in: 36.0.21, 48.0.9, 49.0.6, 50.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.
```

## FAQ

### Is CVE-2026-140420 being exploited?

There is no confirmed exploitation: CVE-2026-140420 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.40% chance of exploitation in the next 30 days (as of 2026-12-03).

### How serious is CVE-2026-140420?

Medium: CVSS 6.9 (v4.0, scored by CNA). Remote, login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-140420?

wasmtime \>= 0.0.0-0, \< 36.0.21; \>= 37.0.0, \< 48.0.9; \>= 49.0.0, \< 49.0.6; \>= 50.0.0, \< 50.0.2.

### Is there a fix for CVE-2026-140420?

Yes. Fixed in 36.0.21, 48.0.9, 49.0.6, 50.0.2. Upgrade wasmtime to one of 36.0.21, 48.0.9, 49.0.6, 50.0.2 (or later in the same release line).

### How do I check if I'm affected by CVE-2026-140420?

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.

## References

- vendor: <https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-5m8g-xhq4-4h93>
- vendor: <https://rustsec.org/advisories/RUSTSEC-2026-0566.html>
- patch: <https://github.com/bytecodealliance/wasmtime/pull/15317>
- other: <https://www.vulncheck.com/advisories/wasmtime-before-36.0.21-unbounded-host-memory-growth-via-asyncwritestream-empty-writes>
- other: <https://crates.io/crates/wasmtime>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-140420>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/RUSTSEC-2026-0566> (license: <https://creativecommons.org/licenses/by/4.0/>)
- FIRST EPSS: EPSS scores by FIRST <https://www.first.org/epss/>

HTML: <https://flawdb.com/CVE-2026-140420> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-140420>
