CVE-2026-47261 — Vulnerability in wasmtime-wasi — CVE Details
wasmtime-wasi: WASI path_open(TRUNCATE) bypasses `FilePerms::WRITE` host restriction
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.50%). Schedule for your next planned update.
Does your project use an affected wasmtime-wasi version?
Paste your Cargo.lock to check it for CVE-2026-47261 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
In wasmtime-wasi, when a filesystem preopen is given DirPerms::all() and FilePerms::READ without FilePerms::WRITE, this wasmtime-wasi enforced access control mechanism can be bypassed by using the wasip2 descriptor.open-at or wasip1 path_open interfaces by opening a file with OpenFlags::TRUNCATE oflag only, for example:
dir_descriptor.open_at(
PathFlags::empty(),
FILENAME,
OpenFlags::TRUNCATE,
DescriptorFlags::READ,
)
wasip1::path_open(
dir_fd,
0,
FILENAME,
wasip1::OFLAGS_TRUNC,
wasip1::RIGHTS_FD_READ,
0,
0
)
The root cause is that the clause that considered OpenFlags::TRUNCATE did not set open_mode |= OpenMode::WRITE;, used later in that function for the access control check against FilePerms for whether opening that file is permitted. With the bug corrected, these calls to open-at and path_open fail with error-code.not-permitted and ERRNO_PERM respectively.
The bug in crates/wasi/src/filesystem.rs, Dir::open_at, lines 967–969:
if oflags.contains(OpenFlags::TRUNCATE) {
opts.truncate(true).write(true);
}
and the single line fix is:
if oflags.contains(OpenFlags::TRUNCATE) {
opts.truncate(true).write(true);
open_mode |= OpenMode::WRITE;
}
Only wasmtime-wasi embeddings that use a combination of DirPerms::MUTATE with FilePerms::READ are affected by this bug, e.g. those that use in the WasiCtxBuilder:
builder.preopened_dir("readonly", "readonly", DirPerms::READ | DirPerms::MUTATE, FilePerms::READ);
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.
Advisory Timeline
- First published June 5, 2026 (174 days ago).
- Last revised September 10, 2026 — 97 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
cargo update -p wasmtime-wasi --precise 44.0.2
cargo update -p wasmtime-wasi --precise 24.0.9
cargo update -p wasmtime-wasi --precise 36.0.10
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (3)
Affects 1 ecosystem: crates.io (1).
| Package | Fixed In |
|---|---|
| wasmtime-wasi crates.io · Affected: All versions | 44.0.2 |
| wasmtime-wasi crates.io · Affected: All versions | 24.0.9 |
| wasmtime-wasi crates.io · Affected: All versions | 36.0.10 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-284
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 7.5 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
References
- https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-2r75-cxrj-cmphWEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-47261ADVISORY
- https://github.com/bytecodealliance/wasmtimePACKAGE
- https://github.com/bytecodealliance/wasmtime/releases/tag/v24.0.9WEB
- https://github.com/bytecodealliance/wasmtime/releases/tag/v36.0.10WEB
- https://github.com/bytecodealliance/wasmtime/releases/tag/v44.0.2WEB
- https://github.com/bytecodealliance/wasmtime/releases/tag/v45.0.0WEB
- https://rustsec.org/advisories/RUSTSEC-2026-0149.htmlWEB
Frequently Asked Questions
- What is CVE-2026-47261?
- wasmtime-wasi: WASI path_open(TRUNCATE) bypasses `FilePerms::WRITE` host restriction. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.5/10).
- How do I check if my project is affected by CVE-2026-47261?
- CVE-2026-47261 affects wasmtime-wasi. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-47261 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 35.8% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-118688HIGH
Filesystem sandbox escape when renaming symlinks with trailing slashes
- CVE-2026-83816HIGH
CodeWhale: exec_shell parallel-readonly classifier auto-approves fd/rg/git grep exec flags enabling silent RCE
- CVE-2026-58494MEDIUM
WASI hard links and renames bypass wasmtime-wasi's FilePerms for destination
- CVE-2026-115387MEDIUM
Guest can panic host through filesystem datetime overflow
- CVE-2026-115385MEDIUM
Guest can panic host through filesystem timestamp before the epoch on wasip3
- CVE-2026-126410MEDIUM
wasip3 UDP `send` can deliver a datagram to an address only allowed for receiving
- CVE-2026-58494MEDIUM
Wasmtime: WASI hard links bypass wasmtime-wasi's FilePerms for destination
- CVE-2026-54786LOW
Wasmtime has a leak in WASIp1 `fd_renumber` implementation