Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

redhat логотип

CVE-2026-47261

Опубликовано: 15 июн. 2026
Источник: redhat
CVSS3: 5.5
EPSS Низкий

Описание

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.

A flaw was found in Wasmtime, a runtime for WebAssembly. This vulnerability allows an attacker to bypass intended access controls when a filesystem preopen is configured with read-only file permissions but also allows directory mutations. By using specific open flags, an attacker can truncate files that should not be writable, leading to unauthorized data modification. This issue affects wasmtime-wasi embeddings that combine directory mutation permissions with read-only file permissions.

Отчет

Conditions for Exploitation: Successful exploitation relies on a highly specific configuration of wasmtime-wasi embeddings. The vulnerability only triggers if a filesystem preopen explicitly combines directory mutation permissions (DirPerms::MUTATE) with read-only file permissions (FilePerms::READ). Impact Limitations: The flaw bypasses access controls solely to allow file truncation, resulting in unauthorized data modification or data loss. It does not enable an attacker to inject arbitrary data, read unpermitted files, execute arbitrary code, or escalate privileges on the host system. Specific Components Not Affected: The standard Wasmtime command-line interface (wasmtime-cli) is completely unaffected by this bug, as it defaults to granting full file permissions for all preopens. This significantly reduces the likelihood of widespread exploitation in default deployments.

Меры по смягчению последствий

To mitigate this issue, ensure that wasmtime-wasi embeddings are not configured with a combination of DirPerms::MUTATE and FilePerms::READ for filesystem preopens. Review WasiCtxBuilder configurations to avoid this vulnerable permission combination, which allows an attacker to bypass access controls and truncate files that should otherwise be read-only.

Затронутые пакеты

ПлатформаПакетСостояниеРекомендацияРелиз
Red Hat Connectivity Link 1rhcl-1/wasm-shim-rhel9Fix deferred
Red Hat Enterprise Linux 10virt-firmware-rsFix deferred
Red Hat Hardened ImagesrustAffected

Показывать по

Дополнительная информация

Статус:

Moderate
Дефект:
CWE-279
https://bugzilla.redhat.com/show_bug.cgi?id=2489049wasmtime-wasi: Wasmtime: Wasmtime: Access control bypass allows unauthorized file truncation via specific open flags.

EPSS

Процентиль: 28%
0.00357
Низкий

5.5 Medium

CVSS3

Связанные уязвимости

CVSS3: 7.5
ubuntu
около 2 месяцев назад

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

CVSS3: 7.5
nvd
около 2 месяцев назад

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, b

CVSS3: 7.5
debian
около 2 месяцев назад

Wasmtime is a runtime for WebAssembly. In versions prior to 24.0.9, 36 ...

CVSS3: 7.5
github
2 месяца назад

wasmtime-wasi: WASI path_open(TRUNCATE) bypasses `FilePerms::WRITE` host restriction

EPSS

Процентиль: 28%
0.00357
Низкий

5.5 Medium

CVSS3