CVE-2026-47261

CVE-2026-47261 is a high-severity security vulnerability in wasmtime-wasi (rust), affecting versions >= 37.0.0, < 44.0.2. It is fixed in 44.0.2, 36.0.10, 24.0.9.

Summary

In wasmtime-wasi, when a filesystem preopen is given DirPerms::all() and FilePerms::READ without FilePerms::WRITE, this wasmtime-wasi enforced access control mechanism can be bypassed by using the wasip2 descriptor.open-at or wasip1 path_open interfaces by opening a file with OpenFlags::TRUNCATE oflag only, for example:

dir_descriptor.open_at(
   PathFlags::empty(),
   FILENAME,
   OpenFlags::TRUNCATE,
   DescriptorFlags::READ,
)
wasip1::path_open(
    dir_fd,
    0,
    FILENAME,
    wasip1::OFLAGS_TRUNC,
    wasip1::RIGHTS_FD_READ,
    0,
    0
)

The root cause is that the clause that considered OpenFlags::TRUNCATE did not set open_mode |= OpenMode::WRITE;, used later in that function for the access control check against FilePerms for whether opening that file is permitted. With the bug corrected, these calls to open-at and path_open fail with error-code.not-permitted and ERRNO_PERM respectively.

The bug in crates/wasi/src/filesystem.rs, Dir::open_at, lines 967–969:

if oflags.contains(OpenFlags::TRUNCATE) {
    opts.truncate(true).write(true);
}

and the single line fix is:

if oflags.contains(OpenFlags::TRUNCATE) {
    opts.truncate(true).write(true);
    open_mode |= OpenMode::WRITE;
}

Only wasmtime-wasi embeddings that use a combination of DirPerms::MUTATE with FilePerms::READ are affected by this bug, e.g. those that use in the WasiCtxBuilder:

builder.preopened_dir("readonly", "readonly", DirPerms::READ | DirPerms::MUTATE, FilePerms::READ);

In particular, the Wasmtime project's wasmtime-cli's use of wasmtime-wasi is not affected, because it always sets FilePerms::all() for all preopens.

Impact

CVE-2026-47261 has a CVSS score of 7.5 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (44.0.2, 36.0.10, 24.0.9); upgrading removes the vulnerable code path.

Affected versions

wasmtime-wasi (>= 37.0.0, < 44.0.2) wasmtime-wasi (>= 25.0.0, < 36.0.10) wasmtime-wasi (< 24.0.9)

Security releases

wasmtime-wasi → 44.0.2 (rust) wasmtime-wasi → 36.0.10 (rust) wasmtime-wasi → 24.0.9 (rust)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade the following packages to resolve this vulnerability:

wasmtime-wasi to 44.0.2 or later; wasmtime-wasi to 36.0.10 or later; wasmtime-wasi to 24.0.9 or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2026-47261? CVE-2026-47261 is a high-severity security vulnerability in wasmtime-wasi (rust), affecting versions >= 37.0.0, < 44.0.2. It is fixed in 44.0.2, 36.0.10, 24.0.9.
  2. How severe is CVE-2026-47261? CVE-2026-47261 has a CVSS score of 7.5 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of wasmtime-wasi are affected by CVE-2026-47261? wasmtime-wasi (rust) versions >= 37.0.0, < 44.0.2 is affected.
  4. Is there a fix for CVE-2026-47261? Yes. CVE-2026-47261 is fixed in 44.0.2, 36.0.10, 24.0.9. Upgrade to this version or later.
  5. Is CVE-2026-47261 exploitable, and should I be worried? Whether CVE-2026-47261 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-47261 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-47261?
    • Upgrade wasmtime-wasi to 44.0.2 or later
    • Upgrade wasmtime-wasi to 36.0.10 or later
    • Upgrade wasmtime-wasi to 24.0.9 or later

Other vulnerabilities in wasmtime-wasi

CVE-2025-53901

Stop the waste.
Protect your environment with Kodem.