CVE-2026-47261

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.
Configurations

Configuration 1 (hide)

OR cpe:2.3:a:bytecodealliance:wasmtime:*:*:*:*:*:rust:*:*
cpe:2.3:a:bytecodealliance:wasmtime:*:*:*:*:*:rust:*:*
cpe:2.3:a:bytecodealliance:wasmtime:*:*:*:*:*:rust:*:*

History

25 Oct 2026, 23:10

Type Values Removed Values Added
Summary
  • (es) Wasmtime es un entorno de ejecución para WebAssembly. En versiones anteriores a la 24.0.9, 36.0.10 y 44.0.2, cuando a una preapertura del sistema de archivos se le otorgan DirPerms::all() y FilePerms::READ sin FilePerms::WRITE, este mecanismo de control de acceso puede ser eludido a través de las interfaces wasip2 descriptor.open-at o wasip1 path_open abriendo un archivo con solo el indicador OpenFlags::TRUNCATE. La causa raíz es que la cláusula que maneja OpenFlags::TRUNCATE en crates/wasi/src/filesystem.rs (Dir::open_at, líneas 967-969) no estableció open_mode |= OpenMode::WRITE;, lo cual se usa posteriormente para la verificación de control de acceso contra FilePerms para determinar si se permite abrir el archivo; la corrección de una sola línea añade esa asignación faltante, después de lo cual las llamadas afectadas fallan correctamente con error-code.not-permitted y ERRNO_PERM respectivamente. Solo las incrustaciones de wasmtime-wasi que combinan DirPerms::MUTATE con FilePerms::READ se ven afectadas por este error. En particular, el uso de wasmtime-wasi por parte de wasmtime-cli del proyecto Wasmtime no se ve afectado, porque siempre establece FilePerms::all() para todas las preaperturas. Este problema ha sido solucionado en las versiones 24.0.9, 36.0.10 y44.0.2.

Information

Published : 2026-06-15 21:17

Updated : 2026-10-25 23:10


NVD link : CVE-2026-47261

Mitre link : CVE-2026-47261

CVE.ORG link : CVE-2026-47261


JSON object : View

Products Affected

bytecodealliance

  • wasmtime
CWE
CWE-284

Improper Access Control

NVD-CWE-noinfo