Giteaで保護対象のファイルを書き換えられる脆弱性、引用符を含むファイル名で回避
Summary
Giteaの保護ブランチ規則で「保護対象のファイルパターン」を回避され、書き込み権限を持つユーザーが保護対象のファイルを追加・変更できる脆弱性です。ワークフローファイルが保護対象だと、追加したワークフローがリポジトリのランナーで実行される可能性があります。28.4.0より前のバージョンが影響を受けるため、28.4.0以降へ更新してください。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
Giteaの保護ブランチ規則で「保護対象のファイルパターン」を回避され、書き込み権限を持つユーザーが保護対象のファイルを追加・変更できる脆弱性です。ワークフローファイルが保護対象だと、追加したワークフローがリポジトリのランナーで実行される可能性があります。28.4.0より前のバージョンが影響を受けるため、28.4.0以降へ更新してください。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| GiteaGitea |
< 28.4.0→ 28.4.0 |
28.4.0 |
Original description The description as published by the source.
The "Protected file patterns" setting of a branch protection rule was checked against file names as git prints them, and git quotes names that contain a double quote, a backslash or a control character. Such names never matched a pattern, so a user with write access could add or change files under a protected pattern by direct push or through a pull request merge, and could move a protected file out of the pattern's reach by renaming it. Where the patterns protect workflow files, this allowed adding a workflow that then ran on the repository's runners. Changed files are now listed unquoted, and a rename reports both the old and the new path.
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory blog.gitea.com
- advisory github.com
- advisory github.com
- advisory nvd.nist.gov
- patch github.com