CVE-2026-58494: Wasmtime: WASI hard links bypass wasmtime-wasi's FilePerms for destination
Wasmtime’s WASI filesystem implementation lets a guest with a read-only source file capability overwrite that file by hard-linking it into another preopen that allows file writes. An attacker who can run a WASI guest can bypass WasiCtxBuilder per-preopen FilePerms and modify host files that were exposed as FilePerms::READ.
This attack is possible through the wasip1, wasip2, and wasip3 interfaces to the WASI filesystem.
This attack is also possible through an indirection of renaming a hardlink into another preopen.
References
- github.com/advisories/GHSA-4ch3-9j33-3pmj
- github.com/bytecodealliance/wasmtime/commit/5ddfd5f1ef28f2041fa07d237ad0336e167b0e0c
- github.com/bytecodealliance/wasmtime/commit/7db94cdcf0c79cb3dfde884b534b653f2dd83367
- github.com/bytecodealliance/wasmtime/commit/8a250aac0962ca1364b5f16525720e9d0b39edcd
- github.com/bytecodealliance/wasmtime/commit/d3ceb56ec35f39e02496eeb4e2d9c7f4fb964d9e
- github.com/bytecodealliance/wasmtime/pull/13725
- github.com/bytecodealliance/wasmtime/releases/tag/v24.0.11
- github.com/bytecodealliance/wasmtime/releases/tag/v36.0.12
- github.com/bytecodealliance/wasmtime/releases/tag/v45.0.3
- github.com/bytecodealliance/wasmtime/releases/tag/v46.0.1
- github.com/bytecodealliance/wasmtime/security/advisories/GHSA-4ch3-9j33-3pmj
- nvd.nist.gov/vuln/detail/CVE-2026-58494
- rustsec.org/advisories/RUSTSEC-2026-0188.html
Code Behaviors & Features
Detect and mitigate CVE-2026-58494 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →