| 概要 | gitoxide is an implementation of git written in Rust. Prior to 0.21.1, a malicious tree can be constructed that will, when checked out with gitoxide, permit writing an attacker-controlled symlink into any existing directory the user has write access to. During checkout, all symlink index entries are deferred and created after regular files using a single shared gix_worktree::Stack. Internally, this uses a gix_fs::Stack. gix_fs::Stack::make_relative_path_current() caches validated path prefixes: when the previously-processed leaf component exactly matches the leading component(s) of the next path, the leaf-to-directory transition at gix-fs/src/stack.rs invokes only delegate.push_directory(), never delegate.push(). In gix_worktree::stack::delegate::StackDelegate, when the state member is State::CreateDirectoryAndAttributesStack, Attributes::push_directory() only loads attributes (from the ODB, in the clone case), and does not perform any other checks. The on-disk symlink_metadata() check and unlink-on-collision live in StackDelegate::push()'s invocation of create_leading_directory(), which is therefore bypassed for the cached prefix. The final symlink is created with plain std::os::unix::fs::symlink, which follows symlinks in parent directories. Therefore, it's possible to provide a tree with duplicate symlink and directory entries that exploits this. This vulnerability is fixed in 0.21.1. |
|---|---|
| 公表日 | 2026年5月14日7:16 |
| 登録日 | 2026年5月15日4:23 |
| 最終更新日 | 2026年5月15日2:18 |
| CVSS3.1 : HIGH | |
| スコア | 7.8 |
|---|---|
| ベクター | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| 攻撃元区分(AV) | ローカル |
| 攻撃条件の複雑さ(AC) | 低 |
| 攻撃に必要な特権レベル(PR) | 不要 |
| 利用者の関与(UI) | 要 |
| 影響の想定範囲(S) | 変更なし |
| 機密性への影響(C) | 高 |
| 完全性への影響(I) | 高 |
| 可用性への影響(A) | 高 |
| タイトル | GitoxideLabsのgix-fsにおけるリンク解釈に関する脆弱性 |
|---|---|
| 概要 | gitoxideはRustで書かれたgitの実装です。0.21.1より前のバージョンでは、悪意のあるツリーを作成することが可能であり、gitoxideでチェックアウトすると攻撃者が制御するシンボリックリンクをユーザーが書き込み権限を持つ任意の既存ディレクトリに書き込むことが可能でした。チェックアウト時にはすべてのシンボリックリンクのインデックスエントリが後回しにされ、通常のファイルの後に単一の共有gix_worktree::Stackを使って作成されます。内部的にはgix_fs::Stackが使用されています。gix_fs::Stack::make_relative_path_current()は検証済みのパスプレフィックスをキャッシュします。以前に処理されたリーフコンポーネントが次のパスの先頭コンポーネントと完全に一致すると、gix-fs/src/stack.rsのリーフからディレクトリへの遷移はdelegate.push_directory()のみを呼び出し、delegate.push()は呼び出しません。gix_worktree::stack::delegate::StackDelegateでは、stateメンバーがState::CreateDirectoryAndAttributesStackの場合、Attributes::push_directory()は属性(クローンの場合はODBから)を読み込むだけで他のチェックは行いません。ディスク上のsymlink_metadata()チェックと衝突時のunlinkはStackDelegate::push()内のcreate_leading_directory()の呼び出しに存在し、キャッシュされたプレフィックスではこれが回避されます。最終的なシンボリックリンクは標準のstd::os::unix::fs::symlinkで作成されており、親ディレクトリのシンボリックリンクをたどります。したがって、重複したシンボリックリンクおよびディレクトリエントリを含むツリーを提供することでこの脆弱性を悪用することが可能です。この脆弱性は0.21.1で修正されました。 |
| 想定される影響 | ・当該ソフトウェアが扱う全ての情報が外部に漏れる可能性があります。 ・当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 ・当該ソフトウェアが完全に停止する可能性があります。 |
| 対策 | ベンダ情報を参照して適切な対策を実施してください。 |
| 公表日 | 2026年5月13日0:00 |
| 登録日 | 2026年6月3日15:38 |
| 最終更新日 | 2026年6月3日15:38 |
| GitoxideLabs |
| gix-fs 0.21.1 未満 |
| No | 変更内容 | 変更日 |
|---|---|---|
| 1 | [2026年06月03日] 掲載 |
2026年6月3日15:38 |