CVE-2026-58439

Branch Protection Bypass via PR Retargeting Preserves Stale `official` Approval Flag

Published Aug 13, 2026 CVSS 3.1 · 8.1 High EPSS < 1% KEV · Not listed
Description
Branch Protection Bypass via PR Retargeting Preserves Stale `official` Approval Flag

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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
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'}

Type Values Removed Values Added
First Time appeared Gitea
Gitea gitea Open Source Git Server
Vendors & Products Gitea
Gitea gitea Open Source Git Server
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
Weaknesses
  • CWE-284

    Improper Access Control

  • CWE-472

    External Control of Assumed-Immutable Web Parameter

Sources

Status
PUBLISHED
Assigner
Gitea
Published
Updated
Aug 14, 2026, 8:01 PM
Reserved
Jun 30, 2026, 6:57 PM
Status
Deferred
Published
Aug 13, 2026, 5:17 PM
Modified
Aug 26, 2026, 4:53 PM
Severity
Important
Public date
Aug 13, 2026, 4:44 PM