# CVE-2026-58494: Wasmtime: WASI hard links bypass wasmtime-wasi's FilePerms for destination

> A WASI guest can overwrite host files via hard links or renames, bypassing read-only file permissions in the Wasmtime runtime.

- **Severity:** Medium 6.5 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 8 Jul 2026
- **Updated:** 9 Jul 2026
- **Also known as:** DEBIAN-CVE-2026-58494, GHSA-4ch3-9j33-3pmj, JLSEC-2026-1368, MINI-hm6w-m864-527m, MINI-pw4r-vcq9-pjp4, MINI-v58j-vw6j-p685, RUSTSEC-2026-0188, UBUNTU-CVE-2026-58494

## What is CVE-2026-58494?

CVE-2026-58494 is a medium-severity missing authorization vulnerability in bytecodealliance wasmtime, published on 8 Jul 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

Wasmtime is a runtime for WebAssembly. Prior to 24.0.11, 36.0.12, 45.0.3, and 46.0.1, wasmtime-wasi hard-link creation and renaming check directory permissions but not matching FilePerms on source and destination preopens, allowing a WASI guest with a read-only source file capability to overwrite host files exposed as FilePerms::READ through wasip1, wasip2, or wasip3 filesystem interfaces. This issue is fixed in versions 24.0.11, 36.0.12, 45.0.3, and 46.0.1.

Weakness: CWE-863 (Incorrect Authorization), CWE-281 (Improper Preservation of Permissions)

## Which versions are affected by CVE-2026-58494?

9 open source packages ship an affected version, including wasmtime-wasi.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `wasmtime-wasi` | crates.io | All versions | 24.0.11 |
| `wasmtime-wasi` | crates.io | All versions | 24.0.11 |
| `wasmtime-wasi` | crates.io | From 0.0.0-0 | 24.0.11, 36.0.12, 45.0.3, 46.0.1 |
| `wasmtime-wasi` | crates.io | From 25.0.0 | 36.0.12 |
| `wasmtime-wasi` | crates.io | From 25.0.0 | 36.0.12 |
| `wasmtime-wasi` | crates.io | From 37.0.0 | 45.0.3 |
| `wasmtime-wasi` | crates.io | From 37.0.0 | 45.0.3 |
| `wasmtime-wasi` | crates.io | From 46.0.0 | 46.0.1 |
| `wasmtime-wasi` | crates.io | From 46.0.0 | 46.0.1 |

## How do I fix CVE-2026-58494?

Upgrade wasmtime-wasi to a fixed version for your release line: 24.0.11, 36.0.12, 45.0.3 or 46.0.1.

## Is CVE-2026-58494 being exploited?

There is no known exploitation of CVE-2026-58494 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-58494 and fix it if it is affected.

What it is: CVE-2026-58494 is a medium-severity missing authorization vulnerability in bytecodealliance wasmtime, published on 8 Jul 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-58494 in the wild and no public exploit code.

Affected packages and fixed versions:
- wasmtime-wasi (crates.io): affected all versions; fixed in 24.0.11
- wasmtime-wasi (crates.io): affected all versions; fixed in 24.0.11
- wasmtime-wasi (crates.io): affected from 0.0.0-0; fixed in 24.0.11, 36.0.12, 45.0.3, 46.0.1
- wasmtime-wasi (crates.io): affected from 25.0.0; fixed in 36.0.12
- wasmtime-wasi (crates.io): affected from 25.0.0; fixed in 36.0.12
- wasmtime-wasi (crates.io): affected from 37.0.0; fixed in 45.0.3
- wasmtime-wasi (crates.io): affected from 37.0.0; fixed in 45.0.3
- wasmtime-wasi (crates.io): affected from 46.0.0; fixed in 46.0.1
- wasmtime-wasi (crates.io): affected from 46.0.0; fixed in 46.0.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-58494/ (Markdown: https://insights.sbomify.com/CVE-2026-58494/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-58494
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-58494
- OSV: https://osv.dev/vulnerability/CVE-2026-58494

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-58494/
Summaries are generated and may contain mistakes; the official description above is the record.
