{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-47261","id":"CVE-2026-47261","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 O","descriptionLong":"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.","published":"2026-06-15T19:47:40.366Z","updated":"2026-10-28T02:30:28.146395878Z","reserved":"2026-05-18T23:03:37.229Z","status":"Analyzed","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"high","source":"GitHub_M"},"metrics":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"high","source":"GitHub_M"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"high","source":"github.com"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"high","source":"OSV"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"high","source":"GitHub"}],"rating":"high","products":["bytecodealliance wasmtime"],"affectedProducts":[{"vendor":"bytecodealliance","product":"wasmtime","defaultStatus":null,"versions":[{"version":">= 37.0.0, < 44.0.2","status":"affected"},{"version":">= 25.0.0, < 36.0.10","status":"affected"},{"version":"< 24.0.9","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"crates.io","name":"wasmtime-wasi","purl":"pkg:cargo/wasmtime-wasi","ranges":[">=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"],"fixed":["44.0.2","36.0.10","24.0.9","45.0.0"],"advisory":"GHSA-2r75-cxrj-cmph"}],"cwes":["CWE-284"],"aliases":["GHSA-2r75-cxrj-cmph","RUSTSEC-2026-0149"],"references":[{"url":"https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-2r75-cxrj-cmph","tags":["x_refsource_CONFIRM","Mitigation","Vendor Advisory","advisory","web"]},{"url":"https://github.com/bytecodealliance/wasmtime/releases/tag/v24.0.9","tags":["x_refsource_MISC","Release Notes","web"]},{"url":"https://github.com/bytecodealliance/wasmtime/releases/tag/v36.0.10","tags":["x_refsource_MISC","Release Notes","web"]},{"url":"https://github.com/bytecodealliance/wasmtime/releases/tag/v44.0.2","tags":["x_refsource_MISC","Release Notes","web"]},{"url":"https://github.com/bytecodealliance/wasmtime/releases/tag/v45.0.0","tags":["x_refsource_MISC","Release Notes","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/47xxx/CVE-2026-47261.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-47261","tags":["advisory"]},{"url":"https://github.com/bytecodealliance/wasmtime","tags":["package"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0149.html","tags":["web","advisory"]},{"url":"https://crates.io/crates/wasmtime-wasi","tags":["package"]},{"url":"https://github.com/bytecodealliance/wasmtime/pull/13429","tags":["web"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial"},"epss":0.00357,"epssPercentile":0.30097,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-47261","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-47261","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-47261","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-2r75-cxrj-cmph","ok":true,"note":"GHSA-2r75-cxrj-cmph"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-47261","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}