{"id":"UBUNTU-CVE-2026-47261","details":"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.","modified":"2026-06-24T11:01:44.558851948Z","published":"2026-06-15T21:17:00Z","upstream":["CVE-2026-47261"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2026-47261"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2026-47261"},{"type":"REPORT","url":"https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-2r75-cxrj-cmph"}],"affected":[{"package":{"name":"rust-wasmtime","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/rust-wasmtime?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["10.0.1+dfsg-7","15.0.1+dfsg-4","16.0.0+dfsg-2","16.0.0+dfsg-3"],"ecosystem_specific":{"binaries":[{"binary_name":"librust-cranelift-dev","binary_version":"0.103.0+16.0.0+dfsg-3"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-47261.json"}},{"package":{"name":"rust-wasmtime","ecosystem":"Ubuntu:25.10","purl":"pkg:deb/ubuntu/rust-wasmtime?arch=source&distro=questing"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["26.0.1+dfsg-3"],"ecosystem_specific":{"binaries":[{"binary_name":"librust-cranelift-dev","binary_version":"0.113.1+26.0.1+dfsg-3"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-47261.json"}},{"package":{"name":"rust-wasmtime","ecosystem":"Ubuntu:26.04:LTS","purl":"pkg:deb/ubuntu/rust-wasmtime?arch=source&distro=resolute"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["26.0.1+dfsg-3","26.0.1+dfsg-4","28.0.1+dfsg-3","29.0.1+dfsg-5","36.0.5+dfsg-1"],"ecosystem_specific":{"binaries":[{"binary_name":"librust-cranelift-dev","binary_version":"0.123.5+36.0.5+dfsg-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-47261.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"},{"type":"Ubuntu","score":"medium"}]}