{"id":"CVE-2026-47261","revision":"51085cb0842440e781e9631425551758","records":[{"revision":"51085cb0842440e781e9631425551758","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-47261","aliases":[],"title":"Wasmtime: WASI path_open(TRUNCATE) bypasses `FilePerms::WRITE` host restriction","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.","state":0,"publishedAt":"2026-06-15T19:47:40.366+00:00","modifiedAt":"2026-06-16T12:46:04.26+00:00","affected":[{"ecosystem":"Vendor product","name":"wasmtime","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"bytecodealliance\",\n                    \"product\": \"wasmtime\",\n                    \"versions\": [\n                        {\n                            \"version\": \">= 37.0.0, < 44.0.2\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \">= 25.0.0, < 36.0.10\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \"< 24.0.9\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 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,"severity":"HIGH"}],"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"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-47261","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-47261","identifiers":["CVE-2026-47261"]},"retained":false,"historicalAffected":[]}],"coverage":[]}