{"id":"CVE-2026-47261","published":"2026-06-15T19:47:40Z","modified":"2026-06-16T12:46:04Z","title":"Wasmtime: WASI path_open(TRUNCATE) bypasses `FilePerms::WRITE` host restriction","vendor":"bytecodealliance","product":"wasmtime","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00357,"percentile":0.30237,"provenance":"source"},"cwes":[{"id":"CWE-284","name":"Improper Access Control"}],"references":[{"url":"https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-2r75-cxrj-cmph","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/bytecodealliance/wasmtime/releases/tag/v24.0.9","tags":["x_refsource_MISC"]},{"url":"https://github.com/bytecodealliance/wasmtime/releases/tag/v36.0.10","tags":["x_refsource_MISC"]},{"url":"https://github.com/bytecodealliance/wasmtime/releases/tag/v44.0.2","tags":["x_refsource_MISC"]},{"url":"https://github.com/bytecodealliance/wasmtime/releases/tag/v45.0.0","tags":["x_refsource_MISC"]}],"priority":{"score":11.3,"factors":[{"name":"EPSS percentile","points":6.05},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"bytecodealliance","affectedVersions":[{"vendor":"bytecodealliance","product":"wasmtime","versions":[">= 37.0.0, < 44.0.2",">= 25.0.0, < 36.0.10","< 24.0.9"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2026-06-16T12:45:55.792446Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"crates.io","package":"wasmtime-wasi","vulnerableRanges":[">=37.0.0, <44.0.2",">=25.0.0, <36.0.10","<24.0.9",">=0.0.0-0, <24.0.9",">=45.0.0, <45.0.0"],"patched":["44.0.2","36.0.10","24.0.9","45.0.0"],"from":["GHSA-2r75-cxrj-cmph","RUSTSEC-2026-0149"],"provenance":"source"}],"summary":{"text":"Wasmtime's WASI filesystem layer (crates/wasi, in Dir::open_at) fails to add write mode when a file is opened with only the TRUNCATE flag, so the FilePerms::WRITE host restriction is not enforced. An attacker with code running inside a Wasm guest can truncate a file on a preopened directory that the host has granted DirPerms::MUTATE and FilePerms::READ without FilePerms::WRITE, via the wasip2 descriptor.open-at or wasip1 path_open calls, and this only affects embeddings that combine those permissions (Wasmtime's own CLI is not affected).","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:55:19Z"},"euvd":{"id":"EUVD-2026-37001","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2025-53901","published":"2025-07-18","fixed":"34.0.2","kev":false,"link":{"from":"CVE-2025-53901","to":"CVE-2026-47261","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"crates.io:wasmtime-wasi","fromFixed":"24.0.4","toFixed":"24.0.9","daysApart":332}]}},{"cve":"CVE-2026-47261","published":"2026-06-15","fixed":"45.0.0","kev":false},{"cve":"CVE-2026-54786","published":"2026-07-01","fixed":"45.0.2","kev":false,"link":{"from":"CVE-2026-47261","to":"CVE-2026-54786","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"crates.io:wasmtime-wasi","fromFixed":"24.0.9","toFixed":"24.0.10","daysApart":16},{"kind":"version-step","provenance":"source","package":"crates.io:wasmtime-wasi","fromFixed":"36.0.10","toFixed":"36.0.11","daysApart":16}]}},{"cve":"CVE-2026-58494","published":"2026-07-08","fixed":"46.0.1","kev":false},{"cve":"CVE-2026-115387","published":"2026-10-22","fixed":"49.0.1","kev":false}],"package":"crates.io:wasmtime-wasi"}}