Skip to content

GHSA-fm79-3f68-h2fc CVE-2025-53901 RUSTSEC-2025-0046

Wasmtime CLI is vulnerable to host panic through its fd_renumber function

Low crates.io
Severity
3.5 / 10
Low · CVSS 3.1
Exploit chance (EPSS)
0.38%
Chance of exploitation in the next 30 days. Higher than 32.09% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-672 Operation on a Resource after Expiration or Release
Fix
Available
2 packages have a fixed version

Description

Summary

A bug in Wasmtime's implementation of the WASIp1 set of import functions can lead to a WebAssembly guest inducing a panic in the host (embedder). The specific bug is triggered by calling path_open after calling fd_renumber with either:

  • two equal argument values
  • second argument being equal to a previously-closed file descriptor number value

The corrupt state introduced in fd_renumber will lead to the subsequent opening of a file descriptor to panic. This panic cannot introduce memory unsafety or allow WebAssembly to break outside of its sandbox, however. There is no possible heap corruption or memory unsafety from this panic.

This bug is in the implementation of Wasmtime's wasmtime-wasi crate which provides an implementation of WASIp1. The bug requires a specially crafted call to fd_renumber in addition to the ability to open a subsequent file descriptor. Opening a second file descriptor is only possible when a preopened directory was provided to the guest, and this is common amongst embeddings. A panic in the host is considered a denial-of-service vector for WebAssembly embedders and is thus a security issue in Wasmtime.

This bug does not affect WASIp2 and embedders using components.

Patches

In accordance with Wasmtime's release process patch releases are available as 24.0.4, 33.0.2, and 34.0.2. Users of other release of Wasmtime are recommended to move to a supported release of Wasmtime.

Workarounds

Embedders who are using components or are not providing guest access to create more file descriptors (e.g. via a preopened filesystem directory) are not affected by this issue. Otherwise there is no workaround at this time and affected embeddings are recommended to update to a patched version which will not cause a panic in the host.

Affected versions

crates.io

PackageVulnerableFixed in
wasmtime
>= 10.0.0, < 24.0.4
24.0.4
wasmtime
>= 33.0.0, < 33.0.2
33.0.2
wasmtime
>= 34.0.0, < 34.0.2
34.0.2
wasmtime
>= 10.0.0, < 24.0.4
>= 25.0.0, < 33.0.2
>= 34.0.0, < 34.0.2
24.0.4
33.0.2
34.0.2
wasmtime-wasi
< 24.0.4
24.0.4
wasmtime-wasi
>= 25.0.0, < 33.0.2
33.0.2
wasmtime-wasi
>= 34.0.0, < 34.0.2
34.0.2

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

wasmtime crates.io → 24.0.4

cargo
cargo update -p wasmtime --precise 24.0.4

wasmtime-wasi crates.io → 24.0.4

cargo
cargo update -p wasmtime-wasi --precise 24.0.4

Severity breakdown

CVSS 3.1 3.5

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

Weakness

CWE-672: Operation on a Resource after Expiration or Release

The product uses, accesses, or otherwise operates on a resource after that resource has been expired, released, or revoked.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
RUSTSEC-2026-0424
Unchecked memory usage in transferring borrowed resources between components
Not rated yet Also affects wasmtime
RUSTSEC-2026-0423
Cross-engine type confusion with host-created struct-types-with-supertypes
Not rated yet Also affects wasmtime
RUSTSEC-2026-0422
Typed functions with `i31` or `nullref` arguments may panic due to insufficient type-check
Low Also affects wasmtime
RUSTSEC-2026-0420
wasip3 UDP `send` can deliver a datagram to an address only allowed for receiving
Medium Also affects wasmtime-wasi
RUSTSEC-2026-0379
Wasmtime: Cranelift backend on aarch64 can jump to incorrect target on large Wasm `br_table` instruction
Critical Also affects wasmtime
GHSA-9pvw-hwfg-92h5
Wasmtime: Panic lowering a host-created component model stream into a guest that expects a different payload type
Medium Also affects wasmtime
GHSA-897f-g5gm-fmxm
Wasmtime: Bit-packing in Cranelift compiler causes silent overflow and miscompilation
Critical Also affects wasmtime
RUSTSEC-2026-0352
Filesystem sandbox escape when renaming symlinks with trailing slashes
Not rated yet Also affects wasmtime-wasi
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor