Skip to content
Threat Feed
high advisory

Gitea: Protected file pattern bypass (CVE-2026-123638)

A vulnerability in Gitea branch protection allows users with write access to bypass protected file pattern enforcement by using filenames containing specific escaped characters, potentially leading to unauthorized workflow execution.

CVE search metadata

CVE search record: CVE-2026-123638. Severity: high. CVSS: 8.3. EPSS: 0.24%. KEV: no. Product: Gitea. Brief: Gitea: Protected file pattern bypass (CVE-2026-123638). Brief link: https://feed.craftedsignal.io/briefs/2026-11-gitea-branch-protection-bypass-cve-2026-123638/

Triage facts

Revision 1
Applicability
Gitea
Evidence
Unknown
Severity
High
Action
Elevated
Sources
2 public sources
Freshness
Revision 1Nov 16, 23:56 UTC
Vulnerabilities
1 CVE
Source quality
A2Roughly even chance

Overview

Gitea is vulnerable to a branch protection bypass (CVE-2026-123638) where the "Protected file patterns" setting fails to correctly match file names that Git formats with quotes, backslashes, or control characters. Because the system checks these against the raw Git output rather than the interpreted path, a malicious actor with write access can modify protected files or rename them to move them out of the protection scope. This vulnerability is particularly critical when patterns are used to protect CI/CD workflow files, as it allows for the introduction of arbitrary workflows that run on repository runners.

Impact

Successful exploitation allows an authorized user to bypass configured branch protection policies. By evading the "Protected file patterns" restriction, an attacker can modify sensitive files or inject malicious workflows into the repository, resulting in unauthorized code execution on CI/CD infrastructure.

Recommendation

  • Audit repository access logs for users with write permissions who may have performed unexpected modifications to protected files.
  • Review current "Protected file patterns" configurations to ensure they are robust against potential renaming and path-obfuscation techniques.
  • Monitor for the introduction of new or modified workflow files in repositories, particularly those involving changes to protected paths.
  • Apply security patches as they become available from the Gitea maintainers; the issue affects versions prior to 28.4.0.

Threat Hunt

Search Gitea audit logs or activity streams for git push events or pull request merges that include file changes or renames affecting directories or files typically covered by protected patterns.

medium medium confidence hunt now

Data: Gitea application audit logs, Repository commit history