# Wasmtime wasmtime-wasi fd_readdir information disclosure

Source: https://junglewise.ai/threats/rustsec-2026-0323-fd-readdir-copies-uninitialized-struct-padding-into-ed3c3a69  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-02. Updated: 2026-10-04  
License: CC BY 4.0 with a link back

Severity: medium · CVSS 4 · Published 2026-10-02

Wasmtime is a WebAssembly runtime that executes untrusted code in sandboxed environments. A flaw in the file directory reading function copies uninitialized memory from the host system into the WebAssembly guest, potentially exposing sensitive data from the host to untrusted guest code. This requires an attacker to have WASM code execution in the runtime and user interaction to trigger the vulnerable code path.

Technologies: [Bytecode Alliance Wasmtime-Wasi](https://junglewise.ai/threats/technologies/bytecode-alliance-wasmtime-wasi), [wasmtime-wasi (crates.io)](https://junglewise.ai/threats/technologies/wasmtime-wasi). Vendors: [Bytecode Alliance](https://junglewise.ai/threats/vendors/bytecode-alliance), [crates.io](https://junglewise.ai/threats/vendors/crates-io).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Medium severity, with a CVSS score of 4, published 2 October 2026.

**Which products and versions are affected?** Bytecode Alliance Wasmtime-Wasi <36.0.17, 37.0.0-48.0.3, 49.0.0-49.0.1; wasmtime-wasi (crates.io) SEMVER:introduced=0.0.0-0,fixed=36.0.17,introduced=37.0.0,fixed=48.0.4,introduced=49.0.0,fixed=49.0.2.

**Is there a fix for This vulnerability?** Yes. wasmtime-wasi (crates.io): upgrade to 49.0.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is This vulnerability attacked?** It is attacked over the network, in a software library.

**Am I affected?** Check whether you run Bytecode Alliance Wasmtime-Wasi or wasmtime-wasi (crates.io) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- wasmtime-wasi (crates.io): upgrade to 49.0.2 or later

  ```sh
  cargo update -p wasmtime-wasi
  ```


## Technical details

The fd_readdir function in wasmtime-wasi fails to zero struct padding before copying directory entry data to guest memory, leaking uninitialized host memory contents. The vulnerability requires network access, low privileges, and passive user interaction to exploit. An attacker gains access to host memory contents that may contain sensitive information.

## Affected products

- Bytecode Alliance wasmtime-wasi <36.0.17, 37.0.0-48.0.3, 49.0.0-49.0.1

## Identifiers

- GHSA-96f6-r43r-8c24
- RUSTSEC-2026-0323

## Timeline

- 2026-10-02: disclosed

## References

- [https://crates.io/crates/wasmtime-wasi](https://crates.io/crates/wasmtime-wasi)
- [https://rustsec.org/advisories/RUSTSEC-2026-0323.html](https://rustsec.org/advisories/RUSTSEC-2026-0323.html)

## Related threats

- [RUSTSEC-2026-0420 - wasip3 UDP `send` can deliver a datagram to an address only allowed for receiving](https://junglewise.ai/threats/rustsec-2026-0420-wasip3-udp-send-can-deliver-a-datagram-to-an-address-cfc65c09)
- [Wasmtime-WASI filesystem sandbox escape with symlink rename](https://junglewise.ai/threats/rustsec-2026-0352-filesystem-sandbox-escape-when-renaming-symlinks-with-86b22c86)
- [RUSTSEC-2026-0321 - WASI preview 0 implementation of `poll_oneoff` circumvents fuel consumption](https://junglewise.ai/threats/rustsec-2026-0321-wasi-preview-0-implementation-of-poll-oneoff-67c5f6e0)
- [RUSTSEC-2026-0324 - Guest can panic host through filesystem timestamp before the epoch on wasip3](https://junglewise.ai/threats/rustsec-2026-0324-guest-can-panic-host-through-filesystem-timestamp-681be084)
- [wasmtime-wasi excessive memory allocation when guests lack stdio](https://junglewise.ai/threats/rustsec-2026-0322-excessive-allocated-memory-on-the-host-when-guests-84ef0787)
