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

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). 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
    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

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.