CVE-2026-47261: wasmtime-wasi WASI Path_open(TRUNCATE) Bypasses `FilePerms::WRITE` Host Vulnerability
HIGHCVE-2026-47261 is a HIGH (CVSS 7.5) wasi path_open(truncate) bypasses `fileperms::write` host vulnerability (CWE-284: Improper Access Control) affecting wasmtime-wasi libraries in the crates.io ecosystem. The issue involves wasi path_open(truncate) bypasses `fileperms::write` host restriction. Remediation is available by upgrading affected packages to version 44.0.2, 36.0.10, 24.0.9.
CVE-2026-47261 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).
How to Fix CVE-2026-47261
To remediate this vulnerability, upgrade all affected wasmtime-wasi dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade wasmtime-wasi to 44.0.2
Upgrade wasmtime-wasi to 36.0.10
Upgrade wasmtime-wasi to 24.0.9
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for wasmtime-wasi
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-47261, inspect your project dependencies for wasmtime-wasi:
inspect dependencies for wasmtime-wasi
Analyze the terminal output to locate any version of wasmtime-wasi in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 44.0.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In wasmtime-wasi, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-47261 Affected wasmtime-wasi Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
wasmtime-wasi
|
crates.io |
≥ 37.0.0
< 44.0.2
|
44.0.2
|
|
wasmtime-wasi
|
crates.io |
≥ 25.0.0
< 36.0.10
|
36.0.10
|
|
wasmtime-wasi
|
crates.io |
< 24.0.9
|
24.0.9
|
References
Frequently Asked Questions
What is CVE-2026-47261?
Which wasmtime-wasi versions are affected?
What version fixes CVE-2026-47261?
Is wasmtime-wasi affected?
What is the CVSS score of CVE-2026-47261?
What CWE is associated with CVE-2026-47261?
How can I check crates.io dependencies for CVE-2026-47261?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2r75-cxrj-cmph",
"modified" : "2026-07-08T17:35:44Z",
"published" : "2026-06-05T15:47:02Z",
"aliases" : [ "CVE-2026-47261" ],
"summary" : "wasmtime-wasi: WASI path_open(TRUNCATE) bypasses `FilePerms::WRITE` host restriction",
"details" : "## Summary\n\nIn `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:\n\n```rust\ndir_descriptor.open_at(\n PathFlags::empty(),\n FILENAME,\n OpenFlags::TRUNCATE,\n DescriptorFlags::READ,\n)\n```\n\n```rust\nwasip1::path_open(\n dir_fd,\n 0,\n FILENAME,\n wasip1::OFLAGS_TRUNC,\n wasip1::RIGHTS_FD_READ,\n 0,\n 0\n)\n```\n\nThe 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.\n\nThe bug in `crates/wasi/src/filesystem.rs`, `Dir::open_at`, lines 967–969:\n\n```rust\nif oflags.contains(OpenFlags::TRUNCATE) {\n opts.truncate(true).write(true);\n}\n```\nand the single line fix is:\n```rust\nif oflags.contains(OpenFlags::TRUNCATE) {\n opts.truncate(true).write(true);\n open_mode |= OpenMode::WRITE;\n}\n```\n\nOnly 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`:\n```rust\nbuilder.preopened_dir(\"readonly\", \"readonly\", DirPerms::READ | DirPerms::MUTATE, FilePerms::READ);\n```\n\nIn particular, the Wasmtime project's `wasmtime-cli`'s use of wasmtime-wasi is not affected, because it always sets `FilePerms::all()` for all preopens.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "wasmtime-wasi"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "37.0.0"
}, {
"fixed" : "44.0.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "wasmtime-wasi"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "25.0.0"
}, {
"fixed" : "36.0.10"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "wasmtime-wasi"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "24.0.9"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-2r75-cxrj-cmph"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-47261"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/bytecodealliance/wasmtime"
}, {
"type" : "WEB",
"url" : "https://github.com/bytecodealliance/wasmtime/releases/tag/v24.0.9"
}, {
"type" : "WEB",
"url" : "https://github.com/bytecodealliance/wasmtime/releases/tag/v36.0.10"
}, {
"type" : "WEB",
"url" : "https://github.com/bytecodealliance/wasmtime/releases/tag/v44.0.2"
}, {
"type" : "WEB",
"url" : "https://github.com/bytecodealliance/wasmtime/releases/tag/v45.0.0"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2026-0149.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-284" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-05T15:47:02Z",
"nvd_published_at" : "2026-06-15T21:17:11Z"
}
}