{"cve":"CVE-2026-47261","nvd":{"published":"2026-06-15T21:17:11.153","modified":"2026-10-25T23:10:00.167","status":"Analyzed","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5},"cwes":["CWE-284"],"references":["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://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-2r75-cxrj-cmph"],"products":["bytecodealliance:wasmtime"],"source":"nvd","synced_at":"2026-10-25T23:44:33.281319194+00:00"},"epss":{"cve":"CVE-2026-47261","score":0.00357,"percentile":0.29172,"date":"2026-10-25"},"kev":null,"osv":[{"id":"GHSA-2r75-cxrj-cmph","url":"https://osv.dev/vulnerability/GHSA-2r75-cxrj-cmph","summary":"wasmtime-wasi: WASI path_open(TRUNCATE) bypasses `FilePerms::WRITE` host restriction","modified":"2026-09-10T03:51:07.520225710Z","packages":[{"ecosystem":"crates.io","name":"wasmtime-wasi","purl":"pkg:cargo/wasmtime-wasi","ranges":[">=37.0.0 <44.0.2"],"fixed":["44.0.2"]},{"ecosystem":"crates.io","name":"wasmtime-wasi","purl":"pkg:cargo/wasmtime-wasi","ranges":[">=25.0.0 <36.0.10"],"fixed":["36.0.10"]},{"ecosystem":"crates.io","name":"wasmtime-wasi","purl":"pkg:cargo/wasmtime-wasi","ranges":["<24.0.9"],"fixed":["24.0.9"]}]},{"id":"RUSTSEC-2026-0149","url":"https://osv.dev/vulnerability/RUSTSEC-2026-0149","summary":"WASI path_open(TRUNCATE) bypasses `FilePerms::WRITE` host restriction","modified":"2026-10-12T18:00:09.236693447Z","packages":[{"ecosystem":"crates.io","name":"wasmtime-wasi","purl":"pkg:cargo/wasmtime-wasi","ranges":[">=0.0.0-0 <24.0.9",">=25.0.0 <36.0.10",">=37.0.0 <44.0.2",">=45.0.0 <45.0.0"],"fixed":["24.0.9","36.0.10","44.0.2","45.0.0"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}