CVE-2026-47261
CVE-2026-47261 · Wasmtime: WASI path_open(TRUNCATE) bypasses `FilePerms::WRITE` host restriction
This page contains facts from public vulnerability sources. Check the original advisory before updating.
Wasmtime is a runtime for WebAssembly. In versions prior to 24.0.9, 36.0.10, and 44.0.2, when a filesystem preopen is given DirPerms::all() and FilePerms::READ without FilePerms::WRITE, this access control mechanism can be bypassed via the wasip2 descriptor.open-at or wasip1 path_open interfaces by opening a file with only the OpenFlags::TRUNCATE oflag. The root cause is that the clause handling OpenFlags::TRUNCATE in crates/wasi/src/filesystem.rs (Dir::open_at, lines 967–969) did not set open_mode |= OpenMode::WRITE;, which is later used for the access control check against FilePerms to determine whether opening the file is permitted; the single-line fix adds that missing assignment, after which the affected calls correctly fail with error-code.not-permitted and ERRNO_PERM respectively. Only wasmtime-wasi embeddings that combine DirPerms::MUTATE with FilePerms::READ are affected by this bug. In particular, the Wasmtime project's wasmtime-cli's use of wasmtime-wasi is not affected, because it always sets FilePerms::all() for all preopens. This issue has been fixed in versions 24.0.9, 36.0.10 and44.0.2.
CVSS 7.5 · High · EPSS 0.5% · Fix available
- Published
- Updated
Stack: system
Affected products and versions
wasmtime
- Versions
- >= 37.0.0, < 44.0.2: Affected
- >= 25.0.0, < 36.0.10: Affected
- < 24.0.9: Affected
No fix published
rust-wasmtime Debian:13
- Versions
- 26.0.1+dfsg-10
- 26.0.1+dfsg-3
- 26.0.1+dfsg-4
- 26.0.1+dfsg-5
- 26.0.1+dfsg-6
- 26.0.1+dfsg-7
- 26.0.1+dfsg-8
- 26.0.1+dfsg-9
- 27.0.0+dfsg-2
- 27.0.0+dfsg-3
- 27.0.0+dfsg-4
- 28.0.1+dfsg-1
- 28.0.1+dfsg-2
- 28.0.1+dfsg-3
- 29.0.1+dfsg-1
- 29.0.1+dfsg-2
- 29.0.1+dfsg-3
- 29.0.1+dfsg-4
- 29.0.1+dfsg-5
- 29.0.1+dfsg-6
- 29.0.1+dfsg-7
- 29.0.1+dfsg-8
- 36.0.11+dfsg-1
- 36.0.12+dfsg-1
- 36.0.12+dfsg-2
- 36.0.12+dfsg-3
- 36.0.13+dfsg-1
- 36.0.5+dfsg-1
- 36.0.5+dfsg-2
- 36.0.5+dfsg-3
- 36.0.5+dfsg-4
- 36.0.5+dfsg-5
- 36.0.6+dfsg-1
- 36.0.6+dfsg-2
- 36.0.6+dfsg-3
- 36.0.6+dfsg-4
- 36.0.6+dfsg-5
- 36.0.6+dfsg-6
- 36.0.6+dfsg-7
- 36.0.7+dfsg-1
- 36.0.8+dfsg-1
- 36.0.9+dfsg-1
- 36.0.9+dfsg-2
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
rust-wasmtime Debian:14
- Versions
- 26.0.1+dfsg-10
- 26.0.1+dfsg-3
- 26.0.1+dfsg-4
- 26.0.1+dfsg-5
- 26.0.1+dfsg-6
- 26.0.1+dfsg-7
- 26.0.1+dfsg-8
- 26.0.1+dfsg-9
- 27.0.0+dfsg-2
- 27.0.0+dfsg-3
- 27.0.0+dfsg-4
- 28.0.1+dfsg-1
- 28.0.1+dfsg-2
- 28.0.1+dfsg-3
- 29.0.1+dfsg-1
- 29.0.1+dfsg-2
- 29.0.1+dfsg-3
- 29.0.1+dfsg-4
- 29.0.1+dfsg-5
- 29.0.1+dfsg-6
- 29.0.1+dfsg-7
- 29.0.1+dfsg-8
- 36.0.5+dfsg-1
- 36.0.5+dfsg-2
- 36.0.5+dfsg-3
- 36.0.5+dfsg-4
- 36.0.5+dfsg-5
- 36.0.6+dfsg-1
- 36.0.6+dfsg-2
- 36.0.6+dfsg-3
- 36.0.6+dfsg-4
- 36.0.6+dfsg-5
- 36.0.6+dfsg-6
- 36.0.6+dfsg-7
- 36.0.7+dfsg-1
- 36.0.8+dfsg-1
- 36.0.9+dfsg-1
- 36.0.9+dfsg-2
- Affected ranges
- ECOSYSTEM: < 36.0.11+dfsg-1
Update to 36.0.11+dfsg-1
rust-wasmtime Ubuntu:24.04:LTS
- Versions
- 10.0.1+dfsg-7
- 15.0.1+dfsg-4
- 16.0.0+dfsg-2
- 16.0.0+dfsg-3
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
rust-wasmtime Ubuntu:25.10
- Versions
- 26.0.1+dfsg-3
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
rust-wasmtime Ubuntu:26.10
- Versions
- 36.0.5+dfsg-1
- 36.0.13+dfsg-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
rust-wasmtime Ubuntu:26.04:LTS
- Versions
- 26.0.1+dfsg-3
- 26.0.1+dfsg-4
- 28.0.1+dfsg-3
- 29.0.1+dfsg-5
- 36.0.5+dfsg-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
Original sources
- https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-2r75-cxrj-cmph
- https://github.com/bytecodealliance/wasmtime/releases/tag/v24.0.9
- https://github.com/bytecodealliance/wasmtime/releases/tag/v36.0.10
- https://github.com/bytecodealliance/wasmtime/releases/tag/v44.0.2
- https://github.com/bytecodealliance/wasmtime/releases/tag/v45.0.0
- https://nvd.nist.gov/vuln/detail/CVE-2026-47261