<Vulnerability name="CVE-2026-54786">
    <DocumentDistribution xml:lang="en">Copyright © 2012 Red Hat, Inc. All rights reserved.</DocumentDistribution>
    <ThreatSeverity>Low</ThreatSeverity>
    <PublicDate>2026-07-01T20:12:35</PublicDate>
    <Bugzilla id="2496195" url="https://bugzilla.redhat.com/show_bug.cgi?id=2496195" xml:lang="en:us">
Wasmtime: Wasmtime: Leak in WASIp1 `fd_renumber` implementation
    </Bugzilla>
    <CWE>CWE-772</CWE>
    <Details xml:lang="en:us" source="Mitre">
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.
    </Details>
    <Details xml:lang="en:us" source="Red Hat">
A flaw was found in Wasmtime, a runtime for WebAssembly. Its native implementation of WASIp1, a system interface for WebAssembly, contains a resource leak in the fd_renumber function. A malicious guest program can repeatedly call this function, causing the host system to exhaust its file descriptors (system resources used to access files or other input/output sources) and other resources. This can lead to a Denial of Service (DoS), making the system unavailable.
    </Details>
    <Statement xml:lang="en:us">
This flaw is rated as Low impact. Wasmtime's WASIp1 implementation can leak file descriptors when renumbering, allowing a malicious guest program to exhaust host resources and cause a Denial of Service. This issue primarily affects Red Hat products that utilize Wasmtime with WASIp1 enabled and allow guest programs to acquire file descriptors.
    </Statement>
    <Mitigation xml:lang="en:us">
To mitigate this issue, configure Wasmtime environments to deny guest programs the ability to acquire file descriptors, such as preventing file system access. This restriction limits the attack surface by preventing the `fd_renumber` function from leaking host resources. Consult product-specific documentation for instructions on configuring Wasmtime security policies to restrict file access. If the Wasmtime service is reloaded or restarted, ensure the configuration changes persist.
    </Mitigation>
    <PackageState cpe="cpe:/a:redhat:connectivity_link:1">
        <ProductName>Red Hat Connectivity Link 1</ProductName>
        <FixState>Fix deferred</FixState>
        <PackageName>rhcl-1/wasm-shim-rhel9</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:10">
        <ProductName>Red Hat Enterprise Linux 10</ProductName>
        <FixState>Fix deferred</FixState>
        <PackageName>virt-firmware-rs</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:hummingbird:1">
        <ProductName>Red Hat Hardened Images</ProductName>
        <FixState>Affected</FixState>
        <PackageName>rust</PackageName>
    </PackageState>
    <References xml:lang="en:us">
https://www.cve.org/CVERecord?id=CVE-2026-54786
https://nvd.nist.gov/vuln/detail/CVE-2026-54786
https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-3p27-qvp9-27qf
    </References>
</Vulnerability>