CVE-2026-47261
Undergoing Analysis Undergoing Analysis - In Progress

Incorrect Permission Bypass in Wasmtime

Vulnerability report for CVE-2026-47261, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-06-15

Last updated on: 2026-06-15

Assigner: GitHub, Inc.

Description

Wasmtime is a runtime for WebAssembly. In versions prior to 24.0.9, 36.0.10, and 44.0.2, when a filesystem preopen is given DirPerms::all() and FilePerms::READ without FilePerms::WRITE, this access control mechanism can be bypassed via the wasip2 descriptor.open-at or wasip1 path_open interfaces by opening a file with only the OpenFlags::TRUNCATE oflag. The root cause is that the clause handling OpenFlags::TRUNCATE in crates/wasi/src/filesystem.rs (Dir::open_at, lines 967–969) did not set open_mode |= OpenMode::WRITE;, which is later used for the access control check against FilePerms to determine whether opening the file is permitted; the single-line fix adds that missing assignment, after which the affected calls correctly fail with error-code.not-permitted and ERRNO_PERM respectively. Only wasmtime-wasi embeddings that combine DirPerms::MUTATE with FilePerms::READ are affected by this bug. 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. This issue has been fixed in versions 24.0.9, 36.0.10 and44.0.2.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-06-15
Last Modified
2026-06-15
Generated
2026-07-06
AI Q&A
2026-06-16
EPSS Evaluated
2026-07-04
NVD

Affected Vendors & Products

Showing 3 associated CPEs
Vendor Product Version / Range
wasmtime wasmtime to 24.0.9 (exc)
wasmtime wasmtime to 36.0.10 (exc)
wasmtime wasmtime to 44.0.2 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-284 The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability exists in Wasmtime, a runtime for WebAssembly, in versions prior to 24.0.9, 36.0.10, and 44.0.2. When a filesystem preopen is configured with DirPerms::all() and FilePerms::READ but without FilePerms::WRITE, the access control can be bypassed. This happens because the code handling the OpenFlags::TRUNCATE flag did not correctly set the write permission flag during the access control check, allowing a file to be opened with truncation even though write permission was not granted.

The root cause is a missing assignment in the code that should have set the open_mode to include write access when the TRUNCATE flag is used. This flaw allows an attacker to bypass the intended read-only restriction and open a file with truncation, effectively modifying it without proper permission.

This issue only affects wasmtime-wasi embeddings that combine DirPerms::MUTATE with FilePerms::READ. The official wasmtime-cli is not affected because it always grants full file permissions for preopens.

Impact Analysis

This vulnerability can allow unauthorized modification of files that are intended to be read-only. An attacker could exploit this flaw to truncate and potentially alter files without having explicit write permissions.

Such unauthorized file modifications can lead to data corruption, loss of data integrity, or disruption of application behavior that relies on those files.

Since the vulnerability has a CVSS base score of 7.5 with high impact on integrity, it represents a significant risk in environments where Wasmtime is used with affected versions and configurations.

Mitigation Strategies

To mitigate this vulnerability, upgrade Wasmtime to version 24.0.9, 36.0.10, or 44.0.2 or later, where the issue has been fixed.

Ensure that any wasmtime-wasi embeddings that combine DirPerms::MUTATE with FilePerms::READ are updated, as these are the affected configurations.

Note that wasmtime-cli's use of wasmtime-wasi is not affected because it always sets FilePerms::all() for all preopens.

Compliance Impact

The vulnerability allows bypassing write permission restrictions, potentially enabling unauthorized file modifications. This could impact data integrity by allowing changes to files without proper authorization.

While the CVE description and resources do not explicitly mention compliance with standards such as GDPR or HIPAA, unauthorized modification of files could lead to non-compliance with regulations that require strict access controls and data integrity protections.

Therefore, organizations using affected versions of Wasmtime with vulnerable configurations might face increased risk of violating data protection and integrity requirements mandated by such standards.

Detection Guidance

This vulnerability involves a bypass of file write permission checks in Wasmtime versions prior to 24.0.9, 36.0.10, and 44.0.2 when using the WASI path_open(TRUNCATE) function with specific permission settings. Detection would involve identifying if your system is running an affected Wasmtime version and if any wasmtime-wasi embeddings use DirPerms::all() with FilePerms::READ but without FilePerms::WRITE on preopened directories.

Since the vulnerability is related to the misuse of the TRUNCATE flag in file open operations, detection could include monitoring or auditing calls to the path_open or open_at interfaces with the OpenFlags::TRUNCATE flag set, especially when the file permissions do not include write access.

There are no specific commands provided in the available resources to detect exploitation attempts or presence of this vulnerability on a system or network.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-47261. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart