CVE-2026-58494: wasmtime-wasi Hard Links Bypass File Permissions
Summary
CVE-2026-58494: Wasmtime: WASI hard links bypass wasmtime-wasi's FilePerms for destination. Affects wasmtime-wasi across 4 version ranges.
< 24.0.11
>= 25.0.0, < 36.0.12
>= 37.0.0, < 45.0.3
>= 46.0.0, < 46.0.1
Fixed in 4 releases; the minimum fixed version depends on the release line you run. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Wasmtime is a runtime for WebAssembly that allows developers to run WebAssembly modules in various environments. The wasmtime-wasi package provides an implementation of the WebAssembly System Interface (WASI), enabling file system access and other system-level functionalities. This package is widely used for executing WASI-compliant applications, making it crucial for developers who rely on WebAssembly for performance and portability. However, a vulnerability in wasmtime-wasi allows unauthorized file modifications due to improper permission checks.
Vulnerability Detail
The vulnerability arises from the ability of a WASI guest to create hard links to files with read-only permissions and then overwrite those files by linking them into directories with write permissions. This flaw occurs because the permission checks for hard-link creation and renaming only verify directory mutation permissions, neglecting to check if the file permissions align with the intended access level. As a result, an attacker can exploit this vulnerability to modify host files that should only be readable, leading to potential data corruption or unauthorized access.
How To Fix
Latest published version: 50.0.0 as of 22 Oct 2026
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
< 24.0.1124.0.11 -
>= 25.0.0, < 36.0.1236.0.12 -
>= 37.0.0, < 45.0.345.0.3 -
>= 46.0.0, < 46.0.146.0.1
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
As a temporary workaround, avoid using combinations of DirPerms::MUTATE with FilePerms::READ in your preopened directories. Ensure that any preopened directories that allow write access also have appropriate file permissions set to prevent unauthorized modifications.
Conclusion
The wasmtime-wasi package has a vulnerability (CVE-2026-58494) that allows unauthorized file modifications through hard links due to insufficient permission checks. It is crucial for users to update to the patched versions to mitigate this risk. Additionally, using Vulert can help monitor for such vulnerabilities in real-time.
See every vulnerability recorded for wasmtime-wasi →
FAQ
CVE-2026-58494 is a vulnerability in the wasmtime-wasi package that allows unauthorized file modifications through hard links due to improper permission checks.
You can check if your application is affected by using the Vulert playground at Vulert Scanner, which monitors and alerts for open-source vulnerabilities in real-time.
The vulnerability can lead to unauthorized modifications of host files, potentially resulting in data corruption or security breaches.
Update the wasmtime-wasi package by modifying your Cargo.toml file to include a patched version or by running 'cargo update -p wasmtime-wasi'.
The CVSS score for this vulnerability is 6.5, indicating a moderate severity level.
References
Related vulnerabilities
Recent vulnerabilities recorded for wasmtime-wasi.