Wasmtime filesystem sandbox escape in WASI symlink handling
bytecodealliance wasmtime
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| wasmtime crates.io |
|
|
bytecodealliance wasmtime
| Product | Affected | Fixed in |
|---|---|---|
| wasmtime crates.io |
|
|
Wasmtime before 24.0.13, 25.0.0 before 36.0.14, 37.0.0 before 46.0.3, and 47.0.0 before 47.0.4 allows a filesystem sandbox escape in wasmtime-wasi because its cap-std dependency mishandles symlinks with trailing slashes on macOS and Linux kernels lacking openat2. A guest with write access to any sandboxed directory can read and write any host-accessible file, and read-only guests may read host files via preexisting symlinks.
From the CVE record · VulnCheck
Wasmtime's wasmtime-wasi filesystem sandbox is vulnerable because its cap-std dependency mishandles symlinks with trailing slashes on macOS and Linux kernels lacking openat2. A guest with write access to any sandboxed directory can read and write host-accessible files; a read-only guest may read host files through preexisting symlinks.
Teams running the crates.io wasmtime package in versions before 24.0.13, from 25.0.0 before 36.0.14, from 37.0.0 before 46.0.3, or from 47.0.0 before 47.0.4 should check their installations.