# GHSA-J2G9-4PRP-PF6H: wasmtime-wasi: guest can panic host through filesystem datetime overflow (wasip1, 2, 3)

- Database: GitHub
- Severity: CVSS 6.2 (Medium)
- Published: 2026-09-24
- Modified: 2026-10-23

## Tracked as

- [CVE-2026-115387](https://cve.now/CVE-2026-115387.md): Wasmtime before 36.0.16, 37.0.0 before 48.0.3, and 49.0.0 before 49.0.1 Host Panic via WASI Filesystem Timestamp Overflow

## Affected versions

- wasmtime-wasi (crates.io): fixed in 36.0.16
- wasmtime-wasi (crates.io): from 37.0.0, fixed in 48.0.3
- wasmtime-wasi (crates.io): 49.0.0

## Description

The wasmtime-wasi crate allows guest WASI programs to trigger a host panic by specifying a filesystem timestamp value where the microseconds field overflows the seconds field. The root cause is that Rust's `std::time::Duration::new` panics in the overflow case, rather than return an error.

## wasip1

The `path_filestat_set_times` and `fd_filestat_set_times` functions take a `timestamp` typed arguments `atim` and `mtim`. A host panic is exposed if the microseconds can overflow the seconds field of this struct, e.g. `Timestamp { seconds: u64::MAX, microseconds: 1_000_000_000 }`, when passed in either argument position (atim or mtim) to these functions, as long as fst_flags does not obviate the atim or mtim argument with the ATIM_NOW/MTIM_NOW flag.

## wasip2

The `set-times` and `set-times-at` methods on `wasi:filesystem/types.descriptor` take two `new-timestamp` typed arguments `atim` and `mtim` where the `timestamp` variant takes a `datetime` struct.  A host panic is exposed if the microseconds can overflow the seconds field of this struct, e.g. `NewTimestamp::Timestamp(Datetime { seconds: u64::MAX, microseconds: 1_000_000_000 })`, when passed in either argument position (atim or mtim) to these functions.

## wasip3

The `set-times` and `set-times-at` methods on `wasi:filesystem/types.descriptor` take two `new-timestamp` typed arguments `atim` and `mtim` where the `timestamp` variant takes a `datetime` struct.  A host panic is exposed if the microseconds can overflow the seconds field of this struct, e.g. `NewTimestamp::Timestamp(Datetime { seconds: i64::MAX, microseconds: 1_000_000_000 })`, when passed in either argument position (atim or mtim) to these functions.

# Patches
The fix for this issue is present the wasmtime project's main branch, as well as in the following patch releases:

36.0.16
48.0.3
49.0.1

## References

- https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-j2g9-4prp-pf6h

Page: https://cve.now/GHSA-J2G9-4PRP-PF6H

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
