Description
Branch Protection Bypass via PR Retargeting Preserves Stale `official` Approval Flag
Published: 2026-08-13
Score: 8.1 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

This vulnerability allows an attacker to bypass branch protection rules by retaining a stale official approval flag after a pull request (PR) is retargeted to a different branch. The stale approval is not cleared or re‑validated when the PR target changes, meaning the PR can be merged or pushes can be performed on a protected branch without revoking the previous approval. This effectively grants a user the ability to push code to protected branches, undermining the repository’s security model and enabling potential tampering or deployment of malicious code.

Affected Systems

The affected product is Gitea, the open source Git server. No specific version range is listed in the CNA data, but the advisory references the release of Gitea 1.27.0 as a fix, indicating that versions prior to that are vulnerable.

Risk and Exploitability

The CVSS score is 8.1 and the EPSS score is < 1%, indicating a high severity vulnerability but a low probability of exploitation. The vulnerability is listed as not in the CISA KEV catalog. The likely attack vector is via the web interface or REST API that allows a user to retarget a PR to a new branch, after which the system mistakenly preserves the existing official approval flag. An attacker with access to create or modify PRs in a repository could exploit this to push changes to protected branches. The lack of an explicit fix or workaround in the CNA data indicates that the only reliable mitigation is to update to a patched version.

Generated by OpenCVE AI on August 22, 2026 at 09:36 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Gitea to version 1.27.0 or later to apply the official fix for stale approval handling.
  • Revoke or refresh all existing official approvals on pull requests that were approved before upgrading, ensuring no stale approvals remain active.
  • Disable or restrict PR retargeting for protected branches, requiring fresh approvals whenever a PR target changes.

Generated by OpenCVE AI on August 22, 2026 at 09:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-w5pg-649r-p6gg Gitea: Branch Protection Bypass via PR Retargeting Preserves Stale `official` Approval Flag
History

Fri, 21 Aug 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-472
References
Metrics threat_severity

None

threat_severity

Important


Fri, 14 Aug 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 13 Aug 2026 19:30:00 +0000

Type Values Removed Values Added
First Time appeared Gitea
Gitea gitea Open Source Git Server
Vendors & Products Gitea
Gitea gitea Open Source Git Server

Thu, 13 Aug 2026 17:00:00 +0000

Type Values Removed Values Added
Description Branch Protection Bypass via PR Retargeting Preserves Stale `official` Approval Flag
Title Branch Protection Bypass via PR Retargeting Preserves Stale `official` Approval Flag
Weaknesses CWE-284
References

Subscriptions

Gitea Gitea Open Source Git Server
cve-icon MITRE

Status: PUBLISHED

Assigner: Gitea

Published:

Updated: 2026-08-14T20:01:50.699Z

Reserved: 2026-06-30T18:57:20.616Z

Link: CVE-2026-58439

cve-icon Vulnrichment

Updated: 2026-08-14T20:01:47.009Z

cve-icon NVD

Status : Deferred

Published: 2026-08-13T17:17:27.913

Modified: 2026-08-26T16:53:48.300

Link: CVE-2026-58439

cve-icon Redhat

Severity : Important

Publid Date: 2026-08-13T16:44:53Z

Links: CVE-2026-58439 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-22T09:45:04Z

Weaknesses
  • CWE-284

    Improper Access Control

  • CWE-472

    External Control of Assumed-Immutable Web Parameter