| タイトル | Bytecode Allianceのwasmtimeにおけるアクセス制御に関する脆弱性 |
|---|---|
| 概要 | WasmtimeはWebAssemblyのランタイムです。バージョン24.0.9未満、36.0.10未満、および44.0.2未満において、ファイルシステムの事前オープンでDirPerms::all()とFilePerms::READが指定され、FilePerms::WRITEが指定されていない場合、このアクセス制御メカニズムはwasip2のdescriptor.open-atまたはwasip1のpath_openインターフェースを介して、OpenFlags::TRUNCATEフラグのみでファイルを開くことで回避される可能性があります。根本的な原因は、crates/wasi/src/filesystem.rsのDir::open_at関数(967行目から969行目の部分)でOpenFlags::TRUNCATEを処理する部分がopen_mode |= OpenMode::WRITE;を設定しておらず、これは後にFilePermsに対するアクセス制御チェックに使用されるため、ファイルのオープンの許可可否を正しく判断できていなかったことです。この1行の修正により、該当する呼び出しは正しくerror-code.not-permittedおよびERRNO_PERMのエラーで失敗するようになりました。このバグの影響を受けるのは、DirPerms::MUTATEとFilePerms::READを組み合わせたwasmtime-wasi埋め込みのみです。特に、Wasmtimeプロジェクトのwasmtime-cliによるwasmtime-wasiの使用は、すべての事前オープンで常にFilePerms::all()を設定しているため影響を受けません。この問題はバージョン24.0.9、36.0.10、および44.0.2で修正されました。 |
| 想定される影響 | ・当該ソフトウェアが扱う情報について、外部への漏えいは発生しません。 ・当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 ・当該ソフトウェアは停止しません。 |
| 対策 | ベンダ情報を参照して適切な対策を実施してください。 |
| 公表日 | 2026年6月15日0:00 |
| 登録日 | 2026年6月22日11:49 |
| 最終更新日 | 2026年6月22日11:49 |
| CVSS3.0 : 重要 | |
| スコア | 7.5 |
|---|---|
| ベクター | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| Bytecode Alliance |
| wasmtime 24.0.9 未満 |
| wasmtime 25.0.0 以上 36.0.10 未満 |
| wasmtime 37.0.0 以上 44.0.2 未満 |
| No | 変更内容 | 変更日 |
|---|---|---|
| 1 | [2026年06月22日] 掲載 |
2026年6月22日11:49 |
| 概要 | 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. |
|---|---|
| 公表日 | 2026年6月16日6:17 |
| 登録日 | 2026年6月17日4:15 |
| 最終更新日 | 2026年6月17日0:49 |