CVE-2026-58439: CWE-284 in Gitea Gitea Open Source Git Server
Branch Protection Bypass via PR Retargeting Preserves Stale `official` Approval Flag
AI Analysis
Technical Summary
Gitea before version 1.27.0 contains a security flaw (CVE-2026-58439) in its pull request review process. Specifically, the 'official' approval flag granted to a pull request review is not reset or re-evaluated if the PR's target branch is changed. An attacker with write permissions can exploit this by obtaining an official approval on a PR targeting an unprotected branch, then retargeting the PR to a protected branch. This bypasses branch protection rules, allowing the PR to be merged without proper maintainer approval. The vulnerability is classified under CWE-863 (Incorrect Authorization).
Potential Impact
An attacker with write access can bypass branch protection mechanisms by exploiting the stale 'official' approval flag when retargeting pull requests. This can lead to unauthorized code merges into protected branches, potentially compromising the integrity of the codebase. The CVSS v3.1 score is 8.1 (high severity), indicating a significant impact on integrity and availability without requiring user interaction.
Mitigation Recommendations
A patch is available that addresses this vulnerability by ensuring the 'official' approval flag is properly re-evaluated when a pull request's target branch is changed. Users should upgrade to Gitea version 1.27.0 or later to remediate this issue. No additional mitigation steps are indicated.
CVE-2026-58439: CWE-284 in Gitea Gitea Open Source Git Server
Description
Branch Protection Bypass via PR Retargeting Preserves Stale `official` Approval Flag
CVSS v3.1
Score 8.1high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Gitea before version 1.27.0 contains a security flaw (CVE-2026-58439) in its pull request review process. Specifically, the 'official' approval flag granted to a pull request review is not reset or re-evaluated if the PR's target branch is changed. An attacker with write permissions can exploit this by obtaining an official approval on a PR targeting an unprotected branch, then retargeting the PR to a protected branch. This bypasses branch protection rules, allowing the PR to be merged without proper maintainer approval. The vulnerability is classified under CWE-863 (Incorrect Authorization).
Potential Impact
An attacker with write access can bypass branch protection mechanisms by exploiting the stale 'official' approval flag when retargeting pull requests. This can lead to unauthorized code merges into protected branches, potentially compromising the integrity of the codebase. The CVSS v3.1 score is 8.1 (high severity), indicating a significant impact on integrity and availability without requiring user interaction.
Mitigation Recommendations
A patch is available that addresses this vulnerability by ensuring the 'official' approval flag is properly re-evaluated when a pull request's target branch is changed. Users should upgrade to Gitea version 1.27.0 or later to remediate this issue. No additional mitigation steps are indicated.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-w5pg-649r-p6gg
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-58439"]
- Ecosystems
- ["Go"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a600abd9c2644c7f8fe2ef3
Added to database: 07/22/2026, 00:11:41 UTC
Last enriched: 08/14/2026, 12:59:36 UTC
Last updated: 09/14/2026, 10:01:32 UTC
Views: 61
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.