{"id":"CVE-2026-58494","published":"2026-07-08T20:22:16Z","modified":"2026-07-09T13:28:57Z","title":"Wasmtime: WASI hard links bypass wasmtime-wasi's FilePerms for destination","vendor":"bytecodealliance","product":"wasmtime","tier":"tail","description":{"text":"Wasmtime is a runtime for WebAssembly. Prior to 24.0.11, 36.0.12, 45.0.3, and 46.0.1, wasmtime-wasi hard-link creation and renaming check directory permissions but not matching FilePerms on source and destination preopens, allowing a WASI guest with a read-only source file capability to overwrite host files exposed as FilePerms::READ through wasip1, wasip2, or wasip3 filesystem interfaces. This issue is fixed in versions 24.0.11, 36.0.12, 45.0.3, and 46.0.1.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00171,"percentile":0.06666,"provenance":"source"},"cwes":[{"id":"CWE-281","name":"Improper Preservation of Permissions"},{"id":"CWE-863","name":"Incorrect Authorization"}],"references":[{"url":"https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-4ch3-9j33-3pmj","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/bytecodealliance/wasmtime/commit/5ddfd5f1ef28f2041fa07d237ad0336e167b0e0c","tags":["x_refsource_MISC"]},{"url":"https://github.com/bytecodealliance/wasmtime/commit/7db94cdcf0c79cb3dfde884b534b653f2dd83367","tags":["x_refsource_MISC"]},{"url":"https://github.com/bytecodealliance/wasmtime/commit/8a250aac0962ca1364b5f16525720e9d0b39edcd","tags":["x_refsource_MISC"]},{"url":"https://github.com/bytecodealliance/wasmtime/commit/d3ceb56ec35f39e02496eeb4e2d9c7f4fb964d9e","tags":["x_refsource_MISC"]},{"url":"https://github.com/bytecodealliance/wasmtime/releases/tag/v24.0.11","tags":["x_refsource_MISC"]},{"url":"https://github.com/bytecodealliance/wasmtime/releases/tag/v36.0.12","tags":["x_refsource_MISC"]},{"url":"https://github.com/bytecodealliance/wasmtime/releases/tag/v45.0.3","tags":["x_refsource_MISC"]},{"url":"https://github.com/bytecodealliance/wasmtime/releases/tag/v46.0.1","tags":["x_refsource_MISC"]}],"priority":{"score":5.9,"factors":[{"name":"EPSS percentile","points":1.33},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"bytecodealliance","affectedVersions":[{"vendor":"bytecodealliance","product":"wasmtime","versions":["< 24.0.11",">= 25.0.0, < 36.0.12",">= 37.0.0, < 45.0.3",">= 46.0.0, < 46.0.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-07-09T13:28:46.718754Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"crates.io","package":"wasmtime-wasi","vulnerableRanges":["<24.0.11",">=25.0.0, <36.0.12",">=37.0.0, <45.0.3",">=46.0.0, <46.0.1",">=0.0.0-0, <24.0.11"],"patched":["24.0.11","36.0.12","45.0.3","46.0.1"],"from":["GHSA-4ch3-9j33-3pmj","RUSTSEC-2026-0188"],"provenance":"source"}],"summary":{"text":"The flaw is in wasmtime-wasi, the WASI component of the Wasmtime WebAssembly runtime, where hard-link creation and renaming check directory permissions but not the matching file permissions on the source and destination preopens. A WASI guest that holds a read-only source file capability can use this to overwrite host files exposed as read-only through the wasip1, wasip2, or wasip3 filesystem interfaces, which requires only that the guest is running locally with low privileges and no user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:17:58Z"},"euvd":{"id":"EUVD-2026-42393","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-bytecodealliance-wasmtime-cve-2022-39392","parents":[{"from":"CVE-2026-27195","to":"CVE-2026-58494","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["crates/wasi/src/p2/host/filesystem.rs"],"commits":["https://github.com/bytecodealliance/wasmtime/commit/9e51c0d9a240a9613d279c061f82286bd11383fd","https://github.com/bytecodealliance/wasmtime/commit/d86b00736b9ece60b3c81e52f7a7e4cdd9f7d895","https://github.com/bytecodealliance/wasmtime/commit/5ddfd5f1ef28f2041fa07d237ad0336e167b0e0c","https://github.com/bytecodealliance/wasmtime/commit/7db94cdcf0c79cb3dfde884b534b653f2dd83367"],"basis":"shared function","functions":["HostDescriptor"]}]},{"from":"CVE-2026-27572","to":"CVE-2026-58494","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["crates/wasi/src/p2/host/filesystem.rs"],"commits":["https://github.com/bytecodealliance/wasmtime/commit/301dc7162cca51def19131019af1187f45901c0a","https://github.com/bytecodealliance/wasmtime/commit/5ddfd5f1ef28f2041fa07d237ad0336e167b0e0c","https://github.com/bytecodealliance/wasmtime/commit/7db94cdcf0c79cb3dfde884b534b653f2dd83367"],"basis":"shared function","functions":["HostDescriptor"]}]}],"packageHistory":[{"cve":"CVE-2025-53901","published":"2025-07-18","fixed":"34.0.2","kev":false},{"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-54786","to":"CVE-2026-58494","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"crates.io:wasmtime-wasi","fromFixed":"24.0.10","toFixed":"24.0.11","daysApart":7},{"kind":"version-step","provenance":"source","package":"crates.io:wasmtime-wasi","fromFixed":"36.0.11","toFixed":"36.0.12","daysApart":7}]}},{"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,"link":{"from":"CVE-2026-58494","to":"CVE-2026-115387","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"crates.io:wasmtime-wasi","fromFixed":"36.0.12","toFixed":"36.0.16","daysApart":106}]}},{"cve":"CVE-2026-115380","published":"2026-10-22","fixed":"49.0.2","kev":false},{"cve":"CVE-2026-115381","published":"2026-10-22","fixed":"49.0.2","kev":false}],"package":"crates.io:wasmtime-wasi"}}