Wasmtime: WASI hard links bypass wasmtime-wasi's FilePerms for destination
bytecodealliance wasmtime
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| wasmtime-wasi crates.io |
|
|
bytecodealliance wasmtime
| Product | Affected | Fixed in |
|---|---|---|
| wasmtime-wasi crates.io |
|
|
46.0.1Wasmtime 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.
From the CVE record · GitHub_M
Affected wasmtime-wasi versions check directory permissions during hard-link creation and renaming but do not check matching file permissions on source and destination preopens. A WASI guest with a read-only source file capability can overwrite host files exposed as FilePerms::READ through the wasip1, wasip2, or wasip3 filesystem interfaces.
Engineers running Wasmtime with wasmtime-wasi versions before 24.0.11, 25.0.0 through 36.0.11, 37.0.0 through 45.0.2, or 46.0.0 should check their deployments.