# CVE-2026-58494: Bytecode Alliance Wasmtime improper permission preservation in wasmtime-wasi

Source: https://junglewise.ai/threats/cve-2026-58494-bytecode-alliance-wasmtime-improper-permission-preservation-in  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-08. Updated: 2026-07-08  
License: CC BY 4.0 with a link back

CVE-2026-58494 · Severity: medium · CVSS 6.5 · Published 2026-07-08

Wasmtime is a tool used to run WebAssembly applications safely in isolated environments. A security flaw was found where the system failed to properly check permissions when creating file links or renaming files. This could allow a malicious application to overwrite sensitive files on the host computer that it should only have permission to read, potentially leading to unauthorized data modification.

Technologies: [wasmtime-wasi (crates.io)](https://junglewise.ai/threats/technologies/wasmtime-wasi). Vendors: [crates.io](https://junglewise.ai/threats/vendors/crates-io).

## Quick answers

**Is CVE-2026-58494 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-58494 being exploited in the wild.

**How severe is CVE-2026-58494?** Medium severity, with a CVSS score of 6.5, published 8 July 2026.

**Which products and versions are affected?** wasmtime-wasi (crates.io) < 24.0.11, SEMVER:introduced=0,fixed=24.0.11, SEMVER:introduced=0.0.0-0,fixed=24.0.11,introduced=25.0.0,fixed=36.0.12,introduced=37.0.0,fixed=45.0.3,introduced=46.0.0,fixed=46.0.1.

**Is there a fix for CVE-2026-58494?** Yes. wasmtime-wasi (crates.io): upgrade to 24.0.11, 46.0.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-58494 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-58494?** Check whether you run wasmtime-wasi (crates.io) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- wasmtime-wasi (crates.io): upgrade to 24.0.11, 46.0.1 or later

  ```sh
  cargo update -p wasmtime-wasi
  ```


## Technical details

A vulnerability exists in wasmtime-wasi's implementation of WASI filesystem interfaces (wasip1, wasip2, and wasip3). The runtime correctly checks directory permissions during hard-link creation and renaming but fails to validate that the FilePerms on the source and destination preopens match. This allows a WASI guest with only read-only capabilities for a source file to create a hard link or rename it to a destination exposed with FilePerms::READ, effectively allowing the guest to overwrite host files. The issue is rooted in improper preservation of permissions (CWE-281) and incorrect authorization (CWE-863). Patches are available in versions 24.0.11, 36.0.12, 45.0.3, and 46.0.1.

## Affected products

- Bytecode Alliance Wasmtime < 24.0.11, >= 25.0.0 < 36.0.12, >= 37.0.0 < 45.0.3, >= 46.0.0 < 46.0.1

## Identifiers

- CVE-2026-58494
- GHSA-4ch3-9j33-3pmj
- RUSTSEC-2026-0188

## Timeline

- 2026-06-24: patched: Fixes committed to various release branches.
- 2026-07-08: disclosed: CVE-2026-58494 published.

## References

- [https://github.com/bytecodealliance/wasmtime/commit/5ddfd5f1ef28f2041fa07d237ad0336e167b0e0c](https://github.com/bytecodealliance/wasmtime/commit/5ddfd5f1ef28f2041fa07d237ad0336e167b0e0c)
- [https://github.com/bytecodealliance/wasmtime/commit/7db94cdcf0c79cb3dfde884b534b653f2dd83367](https://github.com/bytecodealliance/wasmtime/commit/7db94cdcf0c79cb3dfde884b534b653f2dd83367)
- [https://github.com/bytecodealliance/wasmtime/commit/8a250aac0962ca1364b5f16525720e9d0b39edcd](https://github.com/bytecodealliance/wasmtime/commit/8a250aac0962ca1364b5f16525720e9d0b39edcd)
- [https://github.com/bytecodealliance/wasmtime/commit/d3ceb56ec35f39e02496eeb4e2d9c7f4fb964d9e](https://github.com/bytecodealliance/wasmtime/commit/d3ceb56ec35f39e02496eeb4e2d9c7f4fb964d9e)
- [https://github.com/bytecodealliance/wasmtime/releases/tag/v24.0.11](https://github.com/bytecodealliance/wasmtime/releases/tag/v24.0.11)
- [https://github.com/bytecodealliance/wasmtime/releases/tag/v36.0.12](https://github.com/bytecodealliance/wasmtime/releases/tag/v36.0.12)
- [https://github.com/bytecodealliance/wasmtime/releases/tag/v45.0.3](https://github.com/bytecodealliance/wasmtime/releases/tag/v45.0.3)

## Related threats

- [RUSTSEC-2026-0420 - wasip3 UDP `send` can deliver a datagram to an address only allowed for receiving](https://junglewise.ai/threats/rustsec-2026-0420-wasip3-udp-send-can-deliver-a-datagram-to-an-address-cfc65c09)
- [Wasmtime-WASI filesystem sandbox escape with symlink rename](https://junglewise.ai/threats/rustsec-2026-0352-filesystem-sandbox-escape-when-renaming-symlinks-with-86b22c86)
- [RUSTSEC-2026-0321 - WASI preview 0 implementation of `poll_oneoff` circumvents fuel consumption](https://junglewise.ai/threats/rustsec-2026-0321-wasi-preview-0-implementation-of-poll-oneoff-67c5f6e0)
- [RUSTSEC-2026-0324 - Guest can panic host through filesystem timestamp before the epoch on wasip3](https://junglewise.ai/threats/rustsec-2026-0324-guest-can-panic-host-through-filesystem-timestamp-681be084)
- [wasmtime-wasi excessive memory allocation when guests lack stdio](https://junglewise.ai/threats/rustsec-2026-0322-excessive-allocated-memory-on-the-host-when-guests-84ef0787)
