{"document":{"category":"csaf_vex","csaf_version":"2.0","title":"CVE-2026-47261: Wasmtime: WASI path_open(TRUNCATE) bypasses `FilePerms::WRITE` host restriction","publisher":{"category":"vendor","name":"HarborGuard Database","namespace":"https://database.harborguard.co"},"tracking":{"id":"CVE-2026-47261","status":"final","version":"1","initial_release_date":"2026-06-15T19:47:40.366Z","current_release_date":"2026-06-15T19:47:40.366Z","revision_history":[{"date":"2026-06-15T19:47:40.366Z","number":"1","summary":"Initial machine-readable export from HarborGuard."}]},"distribution":{"tlp":{"label":"WHITE"},"text":"Public CVE data; freely redistributable."},"notes":[{"category":"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.","title":"CVE description"}],"references":[{"category":"self","summary":"CVE-2026-47261 on HarborGuard Database","url":"https://database.harborguard.co/cve/CVE-2026-47261"},{"category":"external","summary":"CVE Record","url":"https://www.cve.org/CVERecord?id=CVE-2026-47261"},{"category":"external","summary":"https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-2r75-cxrj-cmph","url":"https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-2r75-cxrj-cmph"},{"category":"external","summary":"https://github.com/bytecodealliance/wasmtime/releases/tag/v24.0.9","url":"https://github.com/bytecodealliance/wasmtime/releases/tag/v24.0.9"},{"category":"external","summary":"https://github.com/bytecodealliance/wasmtime/releases/tag/v36.0.10","url":"https://github.com/bytecodealliance/wasmtime/releases/tag/v36.0.10"},{"category":"external","summary":"https://github.com/bytecodealliance/wasmtime/releases/tag/v44.0.2","url":"https://github.com/bytecodealliance/wasmtime/releases/tag/v44.0.2"},{"category":"external","summary":"https://github.com/bytecodealliance/wasmtime/releases/tag/v45.0.0","url":"https://github.com/bytecodealliance/wasmtime/releases/tag/v45.0.0"}]},"product_tree":{"branches":[{"category":"vendor","name":"bytecodealliance","branches":[{"category":"product_name","name":"wasmtime","branches":[{"category":"product_version","name":">= 37.0.0, < 44.0.2","product":{"name":"bytecodealliance wasmtime >= 37.0.0, < 44.0.2","product_id":"CSAFPID-1","product_identification_helper":{"cpe":"cpe:2.3:a:bytecodealliance:wasmtime:*:*:*:*:*:*:*:*"}}},{"category":"product_version","name":">= 25.0.0, < 36.0.10","product":{"name":"bytecodealliance wasmtime >= 25.0.0, < 36.0.10","product_id":"CSAFPID-2","product_identification_helper":{"cpe":"cpe:2.3:a:bytecodealliance:wasmtime:*:*:*:*:*:*:*:*"}}},{"category":"product_version","name":"< 24.0.9","product":{"name":"bytecodealliance wasmtime < 24.0.9","product_id":"CSAFPID-3","product_identification_helper":{"cpe":"cpe:2.3:a:bytecodealliance:wasmtime:*:*:*:*:*:*:*:*"}}}]}]}]},"vulnerabilities":[{"cve":"CVE-2026-47261","title":"Wasmtime: WASI path_open(TRUNCATE) bypasses `FilePerms::WRITE` host restriction","notes":[{"category":"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.","title":"CVE description"}],"product_status":{"known_affected":["CSAFPID-1","CSAFPID-2","CSAFPID-3"]},"scores":[{"cvss_v3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","baseScore":7.5,"baseSeverity":"HIGH"},"products":["CSAFPID-1","CSAFPID-2","CSAFPID-3"]}],"remediations":[{"category":"none_available","details":"No fixed version is published yet. Monitor the upstream advisory.","product_ids":["CSAFPID-1","CSAFPID-2","CSAFPID-3"]}]}]}