Gitea protected file pattern bypass with quoted file names
Summary
| CVE | CVE-2026-123638 |
|---|---|
| State | PUBLISHED |
| Assigner | Gitea |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-11-15 22:17:18 UTC |
| Updated | 2026-11-15 22:17:18 UTC |
| Description | 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. |
Risk And Classification
Problem Types: CWE-693 | CWE-693 CWE-693: Protection Mechanism Failure
Vendor Declared Affected Products
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/go-gitea/gitea/pull/40362 | 88ee5874-cf24-4952-aea0-31affedb7ff2 | github.com | |
| github.com/go-gitea/gitea/releases/tag/v28.4.0 | 88ee5874-cf24-4952-aea0-31affedb7ff2 | github.com | |
| github.com/go-gitea/gitea/security/advisories/GHSA-w87g-xmrp-86v2 | 88ee5874-cf24-4952-aea0-31affedb7ff2 | github.com | |
| blog.gitea.com/release-of-28.4.0 | 88ee5874-cf24-4952-aea0-31affedb7ff2 | blog.gitea.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: https://github.com/Bryan-Project (en)
CNA: https://github.com/yagcioglutoprak (en)
CNA: https://github.com/lunny (en)
There are currently no legacy QID mappings associated with this CVE.