3.5low
Wasmtime has host panic with `fd_renumber` WASIp1 function
- Severity
- 3.5low CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.39% (higher than 35% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-fm79-3f68-h2fcRUSTSEC-2025-0046
Description
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 `path_open` after calling `fd_renumber` 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 `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. 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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| bytecodealliance wasmtime | < 24.0.4, >= 33.0.0, < 33.0.2, >= 34.0.0, < 34.0.2, before 24.0.4, from 33.0.0 before 33.0.2, from 34.0.0 before 34.0.2 | CVE List, NVD |
| wasmtime-wasi (crates.io) | before 24.0.4, from 25.0.0 before 33.0.2, from 34.0.0 before 34.0.2 | GitHub Advisory Database |
| wasmtime (crates.io) | from 10.0.0 before 24.0.4, from 33.0.0 before 33.0.2, from 34.0.0 before 34.0.2, from 25.0.0 before 33.0.2 | GitHub Advisory Database, RustSec Advisory Database |
All scores
| GitHub_M | 3.5low CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L |
| GitHub | 3.5low CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L |
| RustSec Advisory Database | 3.3low CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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 `path_open` after calling `fd_renumber` 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 `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. 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.
GitHub Advisory Database
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.
RustSec Advisory Database
This is an entry in the RustSec database for the Wasmtime security advisory located at https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-fm79-3f68-h2fc. For more information see the GitHub-hosted security advisory.
NVD (es)
Wasmtime es un entorno de ejecución para WebAssembly. En versiones anteriores a la 24.0.4, 33.0.2 y 34.0.2, un error en la implementación de Wasmtime del conjunto de funciones de importación WASIp1 podía provocar que un invitado de WebAssembly indujera un pánico en el host (incrustador). El error específico se activa al llamar a `path_open` después de llamar a `fd_renumber` con dos valores de argumento iguales o con un segundo argumento igual a un valor numérico de descriptor de archivo previamente cerrado. El estado corrupto introducido en `fd_renumber` provocará que la apertura posterior de un descriptor de archivo genere un pánico. Sin embargo, este pánico no puede generar inseguridad en la memoria ni permitir que WebAssembly se salga de su entorno de pruebas. No existe posibilidad de corrupción del montón ni inseguridad en la memoria a causa de este pánico. Este error se encuentra en la implementación del crate `wasmtime-wasi` de Wasmtime, que proporciona una implementación de WASIp1. El error requiere una llamada especialmente manipulada a `fd_renumber`, además de la capacidad de abrir un descriptor de archivo posterior. Abrir un segundo descriptor de archivo solo es posible cuando se proporcionó un directorio preabierto al invitado, y esto es común entre las incrustaciones. Un pánico en el host se considera un vector de denegación de servicio para los incrustadores de WebAssembly y, por lo tanto, es un problema de seguridad en Wasmtime. Este error no afecta a WASIp2 ni a los incrustadores que utilizan componentes. De acuerdo con el proceso de lanzamiento de Wasmtime, las versiones de parche están disponibles como 24.0.4, 33.0.2 y 34.0.2. Se recomienda a los usuarios de otras versiones de Wasmtime que migren a una versión compatible de Wasmtime. Los incrustadores que utilizan componentes o no proporcionan acceso de invitado para crear más descriptores de archivo (por ejemplo, mediante un directorio del sistema de archivos preabierto) no se ven afectados por este problema. De lo contrario, no hay ninguna solución alternativa en este momento y se recomienda que las incrustaciones afectadas se actualicen a una versión parcheada que no provoque pánico en el host.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-53901 changed 2025-07-18 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-fm79-3f68-h2fc changed 2026-09-10 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2025-0046 changed 2026-10-12 | CC0-1.0 |
| NVD | CVE-2025-53901 changed 2026-06-17 | Public domain |