CVE-2026-54786
JSON

2.3low

Wasmtime: Leak in WASIp1 `fd_renumber` implementation

Severity
2.3low CVSS:4.0 by GitHub_M
Exploit likelihood
0.22% (higher than 12% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-3p27-qvp9-27qfRUSTSEC-2026-0182

Description

Wasmtime is a runtime for WebAssembly. All versions prior to 24.0.10; versions 25.0.0 through those before 36.0.11; versions 37.0.0 through those before 44.0.3; and versions 45.0.0 and 45.0.1 contain a native implementation of WASIp1 which suffers from a leak in the fd_renumber function where the file descriptor being renumbered to is not properly closed. Wasmtime's implementation erroneously only updated the table of descriptors for WASIp1 and didn't update the underlying table of descriptors used by the host. This behavior means that while fd_renumber works correctly from a guest's perspective it ends up leaking resources in the host that aren't cleaned up until the corresponding Store is destroyed. In a loop, guests can use fd_renumber to cause hosts to exhaust both resources and file descriptors. This bug only affects the native implementation of WASIp1, meaning that only runtimes which load core wasm modules and expose fd_renumber are affected. Runtimes are additionally only affected if they expose the ability to acquire a file descriptor, such as opening a file. For runtimes that deny access to files they are unaffected. This issue has been fixed in versions 24.0.10, 36.0.11, 44.0.3, and 45.0.2.

Affected

Product or packageVersionsReported by
bytecodealliance wasmtime< 24.0.10, >= 25.0.0, < 36.0.11, >= 37.0.0, < 44.0.3, >= 45.0.0, < 45.0.2, before 24.0.10, from 25.0.0 before 36.0.11, from 37.0.0 before 44.0.3, from 45.0.0 before 45.0.2CVE List, NVD
wasmtime-wasi (crates.io)before 24.0.10, from 45.0.0 before 45.0.2, from 25.0.0 before 36.0.11, from 37.0.0 before 44.0.3, from 0.0.0-0 before 24.0.10GitHub Advisory Database, RustSec Advisory Database

All scores

GitHub_M2.3low CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:L
GitHub5.0low CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:L
GitHublow CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:L
RustSec Advisory DatabaseNot scored CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:L
NVD5.0medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:L

Classification

CWE-400CWE-772

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Wasmtime is a runtime for WebAssembly. All versions prior to 24.0.10; versions 25.0.0 through those before 36.0.11; versions 37.0.0 through those before 44.0.3; and versions 45.0.0 and 45.0.1 contain a native implementation of WASIp1 which suffers from a leak in the fd_renumber function where the file descriptor being renumbered to is not properly closed. Wasmtime's implementation erroneously only updated the table of descriptors for WASIp1 and didn't update the underlying table of descriptors used by the host. This behavior means that while fd_renumber works correctly from a guest's perspective it ends up leaking resources in the host that aren't cleaned up until the corresponding Store is destroyed. In a loop, guests can use fd_renumber to cause hosts to exhaust both resources and file descriptors. This bug only affects the native implementation of WASIp1, meaning that only runtimes which load core wasm modules and expose fd_renumber are affected. Runtimes are additionally only affected if they expose the ability to acquire a file descriptor, such as opening a file. For runtimes that deny access to files they are unaffected. This issue has been fixed in versions 24.0.10, 36.0.11, 44.0.3, and 45.0.2.

GitHub Advisory Database
Impact

Wasmtime's native implementation of WASIp1 suffers from a leak in the fd_renumber function where the file descriptor being renumbered to is not properly closed. Wasmtime's implementation erroneously only updated the table of descriptors for WASIp1 and didn't update the underlying table of descriptors used by the host. This behavior means that while fd_renumber works correctly from a guest's perspective it ends up leaking resources in the host that aren't cleaned up until the corresponding Store is destroyed. This means that guests can, in a loop, use fd_renumber to cause hosts to exhaust resources or exhaust file descriptors.

This bug only affects the native implementation of WASIp1. This means that only runtimes which load core wasm modules and expose fd_renumber are affected. Runtimes are additionally only affected if they expose the ability to acquire a file descriptor, such as opening a file. For runtimes that deny access to files they are unaffected.

Patches

Wasmtime 24.0.10, 36.0.11, 44.0.3, and 45.0.2 have been released which fix this issue.

Workarounds

There are no workarounds for this issue and hosts are recommended to update.

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-3p27-qvp9-27qf For more information see the GitHub-hosted security advisory.

NVD (es)

Wasmtime es un entorno de ejecución para WebAssembly. Todas las versiones anteriores a la 24.0.10; las versiones 25.0.0 hasta las anteriores a la 36.0.11; las versiones 37.0.0 hasta las anteriores a la 44.0.3; y las versiones 45.0.0 y 45.0.1 contienen una implementación nativa de WASIp1 que sufre de una fuga en la función fd_renumber donde el descriptor de archivo al que se le cambia el número no se cierra correctamente. La implementación de Wasmtime erróneamente solo actualizó la tabla de descriptores para WASIp1 y no actualizó la tabla subyacente de descriptores utilizada por el host. Este comportamiento significa que, si bien fd_renumber funciona correctamente desde la perspectiva de un invitado, termina fugando recursos en el host que no se limpian hasta que se destruye el Store correspondiente. En un bucle, los invitados pueden usar fd_renumber para hacer que los hosts agoten tanto los recursos como los descriptores de archivo. Este error solo afecta la implementación nativa de WASIp1, lo que significa que solo los entornos de ejecución que cargan módulos wasm centrales y exponen fd_renumber se ven afectados. Los entornos de ejecución también solo se ven afectados si exponen la capacidad de adquirir un descriptor de archivo, como abrir un archivo. Para los entornos de ejecución que deniegan el acceso a archivos, no se ven afectados. Este problema ha sido solucionado en las versiones 24.0.10, 36.0.11, 44.0.3 y 45.0.2.

References

https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-3p27-qvp9-27qfvendor-advisory, web
https://nvd.nist.gov/vuln/detail/CVE-2026-54786advisory
https://github.com/bytecodealliance/wasmtime/pull/13650web
https://github.com/bytecodealliance/wasmtime/commit/100bfe27253d2ce5154ddddf66d06e30f3fa6824web
https://github.com/bytecodealliance/wasmtime/commit/36b305d827149ac0336ddcbc0a378c303339d195web
https://github.com/bytecodealliance/wasmtime/commit/72493b11ed5df382c92a9dfb8b6bc064e471f1cdweb
https://github.com/bytecodealliance/wasmtime/commit/e9fbe974c9698edef117323d981e13caf2097c13web
https://github.com/bytecodealliance/wasmtime/commit/f069f125cb77a4a3dced19a77d73790610678622web
https://github.com/bytecodealliance/wasmtimepackage
https://github.com/bytecodealliance/wasmtime/releases/tag/v24.0.10web
https://github.com/bytecodealliance/wasmtime/releases/tag/v36.0.11web
https://github.com/bytecodealliance/wasmtime/releases/tag/v44.0.3web

Sources

SourceRecordLicence
CVE ListCVE-2026-54786 changed 2026-07-02CVE Terms of Use
GitHub Advisory DatabaseGHSA-3p27-qvp9-27qf changed 2026-08-26CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2026-0182 changed 2026-10-12CC0-1.0
NVDCVE-2026-54786 changed 2026-10-25Public domain