CVE-2026-123638

Gitea protected file pattern bypass with quoted file names

Published Nov 15, 2026 CVSS n/a EPSS n/a KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The vulnerability allows a user with write access to a Gitea repository to add or modify files that match protected patterns defined in a branch protection rule. Git prints file names with quoting when they contain a double quote, backslash, or control character; the protected file match test incorrectly used unquoted names, so quoted names never matched a pattern. An attacker can therefore push or merge a file that would normally be blocked, or rename a protected file to remove it from the pattern. When the protected pattern covers workflow files, this permits insertion of a workflow that runs on repository runners, leading to remote code execution. The issue is classified as CWE-693.

Affected Systems

All Gitea instances running a version earlier than 28.4.0 are vulnerable. The official fix was introduced in release 28.4.0 and applies to all later versions. No other vendors or product lines are affected.

Risk and Exploitability

Exploitation requires only that the attacker have normal write privileges to the target repository, a condition common in many projects. Based on the description, it is inferred that an attacker can push a malicious workflow or rename a protected file through a direct push or a pull‑request merge. The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog. Nonetheless, because the vulnerability enables arbitrary code execution on the repository’s runners, the risk is high for affected installations.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to Gitea 28.4.0 or later to apply the official fix
  • Restrict write permissions to sensitive repositories or enforce mandatory review for changes that touch protected paths, especially workflow directories
  • Audit existing protected files for unexpected content, re‑establish branch protection rules ensuring patterns correctly handle quoted characters

Generated by OpenCVE AI on November 15, 2026 at 23:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Gitea
Gitea gitea
Vendors & Products Gitea
Gitea gitea
Type Values Removed Values Added
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.
Title Gitea protected file pattern bypass with quoted file names
Weaknesses CWE-693
References
Weaknesses
  • CWE-693

    Protection Mechanism Failure

Sources

Status
PUBLISHED
Assigner
Gitea
Published
Updated
Nov 15, 2026, 9:14 PM
Reserved
Nov 15, 2026, 8:29 PM
Status
Deferred
Published
Nov 15, 2026, 10:17 PM
Modified
Nov 15, 2026, 10:17 PM