CVE-2026-123638 Gitea protected file pattern bypass with quoted file names
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: partial
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.
Upgrade path
1 package: 1 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| Gitea | < 28.4.0 | 28.4.0 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| Gitea | < 28.4.0 | 28.4.0 |
References
- GitHub Security Advisory GHSA-w87g-xmrp-86v2 vendor-advisory
- Fix on release/v28: go-gitea/gitea pull request #40362 patch
- Gitea 28.4.0 release announcement release-notes
- go-gitea/gitea v28.4.0 release release-notes
- ENISA EUVD EUVD-2026-126124 third-party-advisory