CVE-2025-53901: Wasmtime wasi Wasmtime CLI Is Vulnerable To Vulnerability

LOW
Advisory Identifier: GHSA-fm79-3f68-h2fc
CVSS 3.5
CWE-672
Published
Advisory Summary

CVE-2025-53901 is a LOW (CVSS 3.5) wasmtime cli is vulnerable to vulnerability (CWE-672: Operation on a Resource after Expiration or Release) affecting Wasmtime wasi libraries in the crates.io ecosystem. The issue involves wasmtime cli is vulnerable to host panic through its fd_renumber function. Remediation is available by upgrading affected packages to version 24.0.4, 33.0.2, 34.0.2.

CVE-2025-53901 at a Glance

CVE Identifier CVE-2025-53901
GHSA Identifier GHSA-fm79-3f68-h2fc
Severity LOW
CVSS v3.1 Base Score 3.5
CWE Classification CWE-672: Operation on a Resource after Expiration or Release
Affected Product Wasmtime wasi
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 3.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2025-53901

To remediate this vulnerability, upgrade all affected Wasmtime wasi dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

wasmtime-wasi fixed: 24.0.4
Upgrade wasmtime-wasi to 24.0.4
wasmtime-wasi fixed: 33.0.2
Upgrade wasmtime-wasi to 33.0.2
wasmtime-wasi fixed: 34.0.2
Upgrade wasmtime-wasi to 34.0.2
wasmtime fixed: 24.0.4
Upgrade wasmtime to 24.0.4
wasmtime fixed: 33.0.2
Upgrade wasmtime to 33.0.2
wasmtime fixed: 34.0.2
Upgrade wasmtime to 34.0.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for wasmtime-wasi

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-53901, inspect your project dependencies for Wasmtime wasi:

inspect dependencies for wasmtime-wasi

Analyze the terminal output to locate any version of Wasmtime wasi in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 24.0.4), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-672: Operation on a Resource after Expiration or Release, where the product uses, accesses, or otherwise operates on a resource after that resource has been expired, released, or revoked. In Wasmtime wasi, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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](https://docs.wasmtime.dev/stability-release.html) 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.

CVE-2025-53901 Affected Wasmtime wasi Versions

6 component(s)
Fixed Versions:
24.0.433.0.234.0.2
Product / Package Ecosystem Affected Versions Fixed Version
wasmtime-wasi
crates.io
< 24.0.4
24.0.4
wasmtime-wasi
crates.io
≥ 25.0.0
< 33.0.2
33.0.2
wasmtime-wasi
crates.io
≥ 34.0.0
< 34.0.2
34.0.2
wasmtime
crates.io
≥ 10.0.0
< 24.0.4
24.0.4
wasmtime
crates.io
≥ 33.0.0
< 33.0.2
33.0.2
wasmtime
crates.io
≥ 34.0.0
< 34.0.2
34.0.2

References

Frequently Asked Questions

What is CVE-2025-53901?
CVE-2025-53901 is a security vulnerability in Wasmtime wasi involving Wasmtime CLI is vulnerable to host panic through its fd_renumber function under CWE-672: Operation on a Resource after Expiration or Release.
Which Wasmtime wasi versions are affected?
Affected versions include releases prior to 24.0.4, 33.0.2, 34.0.2 across affected packages: wasmtime-wasi, wasmtime.
What version fixes CVE-2025-53901?
Upgrading to 24.0.4, 33.0.2, 34.0.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is wasmtime-wasi affected?
Yes, wasmtime-wasi is affected in releases prior to 24.0.4, 33.0.2, 34.0.2. Upgrade your dependency to 24.0.4, 33.0.2, 34.0.2 or later.
Is wasmtime affected?
Yes, wasmtime is affected in releases prior to 24.0.4, 33.0.2, 34.0.2. Upgrade your dependency to 24.0.4, 33.0.2, 34.0.2 or later.
What is the CVSS score of CVE-2025-53901?
CVE-2025-53901 has a CVSS v3.1 base score of 3.5 (LOW) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2025-53901?
CVE-2025-53901 is classified under CWE-672: Operation on a Resource after Expiration or Release (The product uses, accesses, or otherwise operates on a resource after that resource has been expired, released, or revoked.).
How can I check crates.io dependencies for CVE-2025-53901?
Run the dependency tree command: 'inspect dependencies for wasmtime-wasi'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-fm79-3f68-h2fc",
  "modified" : "2025-07-21T16:06:01Z",
  "published" : "2025-07-18T19:50:58Z",
  "aliases" : [ "CVE-2025-53901" ],
  "summary" : "Wasmtime CLI  is vulnerable to host panic through its fd_renumber function",
  "details" : "### Summary\n\nA 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).\nThe specific bug is triggered by calling `path_open` after calling `fd_renumber` with either:\n- two equal argument values\n- second argument being equal to a previously-closed file descriptor number value\n\nThe 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.\n\nThis 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.\n\nThis bug does not affect WASIp2 and embedders using components.\n\n### Patches\n\nIn accordance with Wasmtime's [release process](https://docs.wasmtime.dev/stability-release.html) 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.\n\n### Workarounds\n\nEmbedders 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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "wasmtime-wasi"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "24.0.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "wasmtime-wasi"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "25.0.0"
      }, {
        "fixed" : "33.0.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "wasmtime-wasi"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "34.0.0"
      }, {
        "fixed" : "34.0.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "wasmtime"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.0.0"
      }, {
        "fixed" : "24.0.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "wasmtime"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "33.0.0"
      }, {
        "fixed" : "33.0.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "wasmtime"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "34.0.0"
      }, {
        "fixed" : "34.0.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-fm79-3f68-h2fc"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-53901"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bytecodealliance/wasmtime/pull/11277"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bytecodealliance/wasmtime/pull/11278"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bytecodealliance/wasmtime/pull/11279"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bytecodealliance/wasmtime/pull/11281"
  }, {
    "type" : "WEB",
    "url" : "https://docs.wasmtime.dev/security-what-is-considered-a-security-vulnerability.html"
  }, {
    "type" : "WEB",
    "url" : "https://docs.wasmtime.dev/stability-release.html"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/WebAssembly/WASI/blob/e1aa1cae4dda4c1f70f23fe11e922aae92f240a8/legacy/preview1/witx/wasi_snapshot_preview1.witx#L245-L260"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/bytecodealliance/wasmtime"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bytecodealliance/wasmtime/blob/037a6edadbc225decbea00a551aabf04203717d9/crates/wasi/src/preview1.rs#L1824-L1836"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2025-0046.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-672" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-07-18T19:50:58Z",
    "nvd_published_at" : "2025-07-18T18:15:24Z"
  }
}