CVE-2026-58439
Received Received - Intake

Branch Protection Bypass in GitHub via PR Retargeting

Vulnerability report for CVE-2026-58439, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-13

Last updated on: 2026-08-13

Assigner: Gitea Limited

Description

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

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-13
Last Modified
2026-08-13
Generated
2026-08-13
AI Q&A
2026-08-13
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
gitea gitea to 1.26.4 (inc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-284 The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability allows an attacker with write access to bypass branch protection rules in Gitea. It works by exploiting how approvals are handled when a pull request's target branch is changed. The attacker gets an official approval on a PR targeting an unprotected branch, then retargets it to a protected branch. The approval's official flag remains valid even though it should be reevaluated for the protected branch, allowing unauthorized merges.

Detection Guidance

Check Gitea server logs for unusual PR retargeting events where approvals persist after branch changes. Review repository settings for protected branches and verify if official approval flags are reevaluated when PR targets change. No specific commands are provided in the advisory.

Impact Analysis

If exploited, this vulnerability could allow unauthorized code merges into protected branches like master. This may lead to privilege escalation, unauthorized changes in the codebase, or potential introduction of malicious code. Attackers only need write access and the ability to create pull requests, making it a significant risk for repositories with branch protection enabled.

Mitigation Strategies

Upgrade Gitea to version 1.26.4 or later to address the vulnerability. Review and update branch protection rules to ensure approvals are reevaluated when PR targets change. Monitor PR activities for unauthorized retargeting attempts.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-58439. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart