CVE-2026-58439
Gitea · Gitea Open Source Git Server
A branch protection bypass vulnerability in Gitea allows authenticated users to retarget pull requests while preserving stale approval flags, potentially resulting in unauthorized code merges.
Executive summary
An authenticated branch protection bypass in Gitea Open Source Git Server poses a high risk to repository integrity by allowing unauthorized code modifications.
Vulnerability
This vulnerability is a flaw in access control (CWE-284) where the system fails to invalidate existing approval flags when a pull request is retargeted. An authenticated user with sufficient permissions to interact with pull requests can exploit this logic error to bypass branch protection rules.
Business impact
The ability to bypass branch protection rules undermines the security of the software development lifecycle by allowing unapproved or malicious code to be merged into protected branches. This could lead to the introduction of backdoors, supply chain compromise, or unauthorized changes to critical production code. With a CVSS score of 8.1, the high potential for integrity impact necessitates immediate attention to maintain the security of the development environment.
Remediation
Immediate Action: Update Gitea Open Source Git Server to version 1.27.0 or later to apply the necessary security patch.
Proactive Monitoring: Review repository pull request history and audit logs for unusual retargeting activities or merges occurring without legitimate peer approval.
Compensating Controls: Enforce strict organizational policies regarding pull request approvals and conduct manual audits of high-risk merges until the patch is deployed.
Exploitation status
Public Exploit Available: No confirmed public exploit is available.
Analyst recommendation
Given the severity of this vulnerability and the potential for unauthorized code injection into protected branches, organizations using Gitea should prioritize the upgrade to version 1.27.0. Ensuring that branch protection mechanisms function as intended is vital for maintaining the security of the codebase and preventing unauthorized modifications.
More Gitea CVEs
Sources
Originally found and disclosed by yonatan-pl, per the CVE Program record.
- GitHub Security Advisory Vendor advisory
- Gitea v1.27.0 Release Release notes
- Gitea v1.27.0 Release Blog Post Release notes