CVE-2026-123638 in Giteainfo

Summary

by MITRE • 11/16/2026

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.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 11/16/2026

The vulnerability described constitutes a significant bypass of branch protection rules within Git-based version control systems, specifically affecting how file patterns are matched against filenames during commit operations. This flaw arises from an inconsistency in string handling where the system compares protected file patterns against git's raw output format rather than normalized or unquoted paths. In many Unix-like environments and Git internals, filenames containing special characters such as double quotes, backslashes, or control characters are often escaped or quoted to preserve their integrity during transmission and display. The security logic failed to account for this quoting mechanism, resulting in a scenario where the pattern matching algorithm could not successfully identify files with these specific character sequences because it was comparing unescaped patterns against escaped filenames.

This technical flaw allows an attacker who possesses write access to a repository to circumvent branch protection restrictions entirely. By crafting file names that include double quotes, backslashes, or control characters, the user can add new protected files or modify existing ones through direct pushes or pull request merges without triggering the required approval workflows or status checks enforced by the branch rule. Furthermore, this vulnerability enables an attacker to effectively remove a protected file from its protective scope simply by renaming it to include one of these special characters. Since the system fails to recognize the renamed file as matching the protected pattern, subsequent changes to that file proceed without restriction, undermining the integrity controls intended to safeguard critical repository assets.

The operational impact is particularly severe when branch protection rules are applied to workflow configuration files, such as GitHub Actions workflows or similar CI/CD pipeline definitions. In these scenarios, an attacker can inject malicious code by adding a new workflow file with a specially crafted name that bypasses the pattern check. Once merged into the protected branch, this unauthorized workflow executes on the repository's runners under the context of the main branch. This leads to arbitrary code execution within the CI/CD environment, potentially resulting in data exfiltration, credential theft, or further compromise of downstream systems and infrastructure dependent on these automated processes. The ability to move files out of pattern reach also means that historical protections can be nullified by simple renaming operations, leaving critical configurations vulnerable to unauthorized modification.

From a classification perspective, this vulnerability aligns with CWE-20 Improper Input Validation, as the system fails to properly sanitize or normalize input filenames before performing security-critical comparisons. It also relates to CWE-798 Use of Hard-coded Credentials if the bypass leads to access control failures, and more broadly to CWE-693 Protection Mechanism Failure due to the inability of the branch protection feature to enforce its intended policy. In terms of adversary tactics, this technique corresponds to ATT&CK T1059 Command and Scripting Interpreter for executing malicious workflows and potentially T1485 Data Destruction or Exfiltration if the compromised runners are used to steal data. The core issue is a logic error in path normalization that allows attackers to exploit edge cases in filename encoding to evade security controls.

To mitigate this vulnerability, it is essential to ensure that all file paths are normalized and unquoted before being compared against protected patterns. This involves stripping escape characters or decoding quoted strings so that the pattern matching engine operates on a consistent representation of the file path regardless of special character presence. Additionally, systems should implement strict validation for filenames containing control characters or backslashes in contexts where branch protection is active, potentially rejecting such names outright if they are not strictly necessary for legitimate development workflows. Updating the logic to list changed files unquoted and reporting both old and new paths during rename operations ensures that security audits can accurately track file movements even when special characters are involved. Regular updates to version control platforms and CI/CD tools are critical, as vendors typically release patches addressing these normalization issues promptly once identified. Administrators should also review branch protection settings regularly to ensure no protected files have been inadvertently moved or renamed into unprotected states due to this flaw.

Responsible

Gitea

Reservation

11/15/2026

Disclosure

11/16/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!