Gitea: Permanent Fork PR Workflow Approval Gate Bypass (CVE-2026-58424)
Affects Gitea code.gitea.io/giteaSource GCVE Database
Not known to be exploited · CVSS 8.9 High.
Data as of 10/24/2026, 22:16:04 UTC
- Exploitation
Not in CISA KEV, no exploitation reported
- EPSS
- 0.3% chance of exploitation in 30 days – higher than 29% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:H/A:HWhat to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
GitHubgo-gitea/giteapkg:github/go-gitea/giteaOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Repository administrators should be aware that approving a fork PR workflow run from a new contributor permanently grants that user the ability to run arbitrary workflows without further approval. As a temporary mitigation, administrators should avoid approving fork PR workflow runs from untrusted contributors until a fix is released. Monitor Gitea vendor advisories for updates and apply official patches once available.
Description
Gitea Actions contains a vulnerability in the fork pull request workflow approval gate that allows an attacker with a single unprivileged account and one-time maintainer approval on a benign fork PR to permanently bypass approval for all future fork PR workflow runs from that user on the same repository. This bypass occurs because the approval check only verifies if the user has any previously approved run in the repository, without considering the pull request, commit, or workflow contents. The vulnerability affects all Gitea versions from v1.20.0 onward and remains unpatched as of this disclosure.
Impact
An attacker with a standard authenticated account capable of forking the repository can gain persistent ability to execute arbitrary workflow code on the repository's CI runners after a single approval of a benign fork PR workflow by a repository administrator. This allows execution of arbitrary shell commands with network access and repository source access, potentially leading to code execution, data exposure, and disruption of CI infrastructure. The vulnerability undermines the intended security gate for fork PR workflows, effectively granting permanent elevated trust to the attacker within the affected repository.
Summary
The vulnerability (CVE-2026-58424) resides in Gitea Actions' approval gate for workflows triggered by fork pull requests. The function ifNeedApproval incorrectly skips approval if the triggering user has any previously approved workflow run in the repository, regardless of the PR, commit, or workflow file. This logic flaw means that after a single approval by a repository administrator on a benign fork PR, the user is permanently trusted to run arbitrary workflows on the repository's CI infrastructure. The issue was introduced in commit edf98a2dc3 on 2023-02-24 and affects all releases from v1.20.0 through versions prior to 1.26.3, including the latest development builds. No official fix is available yet. The vulnerability requires an authenticated user with fork capability and one-time interaction from a repository admin. It was live-verified on Gitea main branch in May 2026.
Weaknesses
- CWE-285Improper Authorization (opens in a new tab)
Class weaknessLikelihood of exploit: HighOWASP Top 10 A01:2025: Broken Access Control (opens in a new tab)
The product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action.
MITRE discourages mapping vulnerabilities to this broad entry; the root cause is usually a more specific weakness.
- CWE-732Incorrect Permission Assignment for Critical Resource (opens in a new tab)
Class weaknessLikelihood of exploit: HighOWASP Top 10 A01:2025: Broken Access Control (opens in a new tab)
The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors.
- CWE-863Incorrect Authorization (opens in a new tab)
Class weaknessLikelihood of exploit: HighCWE Top 25 (2025): #17OWASP Top 10 A01:2025: Broken Access Control (opens in a new tab)
The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.
References
- github.com/go-gitea/gitea/security/advisories/GHSA-777r-4v59-6486 (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-58424 (opens in a new tab)
- github.com/go-gitea/gitea/pull/38010 (opens in a new tab)
- github.com/go-gitea/gitea/commit/699fe2ef43b9466ac1b0cb857029f91fd5b0056d (opens in a new tab)
- github.com/go-gitea/gitea/commit/e107498f3b6fccff35455ef17430ca68df665297 (opens in a new tab)
- blog.gitea.com/release-of-1.26.3-and-1.26.4 (opens in a new tab)
- github.com/go-gitea/gitea (opens in a new tab)
- github.com/go-gitea/gitea/releases/tag/v1.26.4 (opens in a new tab)