Critical Gitea Authorization Flaw (CVE-2026-58443) Exposes Private Repositories to Unauthorized Workflow Execution
A critical vulnerability in Gitea, tracked as CVE-2026-58443 (CVSS v3.1: Critical), allows attackers to bypass API token restrictions and write to private repositories, potentially triggering unauthorized Actions workflows. Disclosed via GHSA-xxjv-752h-3vp2 and reported by ohxorud-dev, the flaw stems from an incorrect authorization check in Gitea’s pull request update endpoint (POST /api/v1/repos/{owner}/{repo}/pulls/{index}/update).
The bug occurs because Gitea only validates a token’s public-only restriction against the base repository (public) rather than the head repository (private) involved in the request. When UpdatePullRequest() processes the update, it authorizes the head repository via standard RBAC but fails to recheck the token’s scope, enabling server-side pushes to private branches. If Gitea Actions is enabled on the private repository, the unauthorized push triggers workflows as if performed by a legitimate contributor, turning the bypass into a vector for executing private CI/CD pipelines.
A proof-of-concept (PoC) demonstrates the attack chain: a public-only token with write:repository permissions creates a file in a public repo, opens a pull request from a private branch, and uses the update endpoint to merge public commits into the private branch successfully triggering private workflows. While the flaw does not expose private data (confidentiality remains intact), it constitutes a severe integrity violation (CWE-863: Incorrect Authorization).
Exploitation requires a valid public-only token belonging to a user with write access to the private repository, along with an existing pull request linking public and private repos. This limits attacks to scenarios involving token mismanagement or compromised credentials, rather than unauthenticated access.
Affected Versions & Mitigation
Gitea versions up to and including v1.26.4 are vulnerable. The issue is patched in v1.27.0. Self-hosted instances should upgrade immediately, audit public-only tokens for suspicious pull request activity, and review Actions logs for unauthorized workflow executions.
This disclosure follows a series of mid-2026 Gitea advisories, including a reverse-proxy authentication bypass and an SSRF flaw in webhook handling, highlighting recurring scope-boundary failures in route-level authorization checks.
Source: https://cyberpress.org/critical-gitea-vulnerability/
CommitGo cybersecurity rating report: https://www.rankiteo.com/company/commitgo
"id": "COM1784629621",
"linkid": "commitgo",
"type": "Vulnerability",
"date": "6/2026",
"severity": "85",
"impact": "4",
"explanation": "Attack with significant impact with customers data leaks"
{'affected_entities': [{'customers_affected': 'Self-hosted Gitea instances '
'(versions ≤1.26.4)',
'industry': 'Version Control / DevOps',
'name': 'Gitea',
'type': 'Software Provider'}],
'attack_vector': 'API Token Exploitation',
'data_breach': {'data_exfiltration': 'No (confidentiality remains intact)'},
'description': 'A critical vulnerability in Gitea, tracked as CVE-2026-58443 '
'(CVSS v3.1: Critical), allows attackers to bypass API token '
'restrictions and write to private repositories, potentially '
'triggering unauthorized Actions workflows. The flaw stems '
'from an incorrect authorization check in Gitea’s pull request '
'update endpoint, enabling server-side pushes to private '
'branches and unauthorized execution of private CI/CD '
'pipelines if Gitea Actions is enabled.',
'impact': {'operational_impact': 'Unauthorized execution of private CI/CD '
'workflows',
'systems_affected': 'Gitea instances (versions up to and including '
'v1.26.4)'},
'lessons_learned': 'Recurring scope-boundary failures in route-level '
'authorization checks highlight the need for rigorous '
'token-scope validation in API endpoints.',
'post_incident_analysis': {'corrective_actions': 'Patch released in v1.27.0 '
'to enforce proper '
'token-scope validation for '
'both base and head '
'repositories',
'root_causes': 'Incorrect authorization check in '
'Gitea’s pull request update '
'endpoint, failing to revalidate '
'token scope for private '
'repositories'},
'recommendations': ['Upgrade Gitea to v1.27.0 immediately',
'Audit public-only tokens for suspicious activity',
'Review Actions logs for unauthorized workflow executions',
'Implement stricter token-scope validation in API '
'endpoints'],
'references': [{'source': 'GitHub Advisory Database',
'url': 'GHSA-xxjv-752h-3vp2'}],
'response': {'containment_measures': 'Upgrade to Gitea v1.27.0',
'remediation_measures': 'Audit public-only tokens for suspicious '
'pull request activity, review Actions '
'logs for unauthorized workflow '
'executions'},
'title': 'Critical Gitea Authorization Flaw (CVE-2026-58443) Exposes Private '
'Repositories to Unauthorized Workflow Execution',
'type': 'Authorization Bypass',
'vulnerability_exploited': 'CVE-2026-58443 (CWE-863: Incorrect Authorization)'}