CVE-2025-53901: Wasmtime has host panic with `fd_renumber` WASIp1 function

Published Jul 18, 2025
·
Updated

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 pathopen after calling fdrenumber with either: - two equal argument values - second argument being equal to a previously-closed file descriptor number value

The corrupt state introduced in fdrenumber 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 fdrenumber 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.

Other sources

Wasmtime is a runtime for WebAssembly. Prior to versions 24.0.4, 33.0.2, and 34.0.2, 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 pathopen after calling fdrenumber with either two equal argument values or a second argument being equal to a previously-closed file descriptor number value. The corrupt state introduced in fdrenumber 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 fdrenumber 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. 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. 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.

MITRE

Affected Software

10 affected componentsFixes available
Wasmtime Wasmtime<24.0.4, <33.0.2, <34.0.2
rust/wasmtime>=34.0.0<34.0.2
34.0.2
rust/wasmtime>=33.0.0<33.0.2
33.0.2
rust/wasmtime>=10.0.0<24.0.4
24.0.4
rust/wasmtime-wasi>=34.0.0<34.0.2
34.0.2
rust/wasmtime-wasi>=25.0.0<33.0.2
33.0.2
rust/wasmtime-wasi<24.0.4
24.0.4
bytecodealliance Wasmtime Rust<24.0.4
bytecodealliance Wasmtime Rust>=33.0.0<33.0.2
bytecodealliance Wasmtime Rust>=34.0.0<34.0.2

Event History

Jul 18, 2025
CVE Published
via MITRE·05:10 PM
Data Sourced
via MITRE·05:10 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:15 PM
Affected Software
Advisory Published
via GitHub·07:50 PM
Data Sourced
via GitHub·07:50 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-53901?

CVE-2025-53901 has a moderate severity as it can lead to a panic in the host environment.

2

What versions of Wasmtime are affected by CVE-2025-53901?

CVE-2025-53901 affects Wasmtime versions prior to 24.0.4, 33.0.2, and 34.0.2.

3

How do I fix CVE-2025-53901?

To fix CVE-2025-53901, update Wasmtime to versions 24.0.4, 33.0.2, or 34.0.2 or later.

4

What is the cause of CVE-2025-53901?

CVE-2025-53901 is caused by a bug in Wasmtime's implementation of the WASIp1 import functions.

5

Can CVE-2025-53901 be exploited by a WebAssembly guest?

Yes, CVE-2025-53901 can be exploited by a WebAssembly guest through the malicious use of the `path_open` function.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203