Critical Gitea Authorization Bypass Lets Public-Only Tokens Write to Private Repos
Vulnerability Disclosure · 2 sources · Updated 4mo ago · First seen Jul 20, 2026

A critical Gitea authorization bypass tracked as CVE-2026-58443 allows a public-only access token with write:repository scope to push commits into a private repository under specific pull request conditions. The flaw affects Gitea releases up to and including v1.26.4 and was fixed in v1.27.0. Researchers said the issue lies in the pull request update endpoint, where Gitea checks the token’s public-only restriction against the public base repository but fails to enforce that restriction again when operating on the private head repository.
The bug can be abused to perform unauthorized server-side merges or rebases into a private pull request head branch, and those writes may also trigger Gitea Actions workflows on the private repository if Actions is enabled. Public reporting included a technical analysis and a working proof-of-concept, though no confirmed in-the-wild exploitation was cited. Administrators were urged to upgrade to v1.27.0, audit and rotate or revoke public-only tokens with write permissions, review public-to-private pull request relationships, and inspect recent private repository pushes and Actions logs for suspicious activity.
Why it matters
Impact assessment
CVE-2026-58443 is a critical authorization bypass in Gitea that affects organizations running Gitea up to v1.26.4, especially teams using public-only tokens for automation, CI/CD, or developer workflows. The flaw enables unauthorized writes into private repository pull request head branches under specific conditions, creating risk of code tampering, workflow execution, and operational disruption in private development environments.
The impact is high because the vulnerability breaks the intended isolation boundary of public-only tokens and can lead to integrity and availability issues in private repositories. Public reporting includes technical analysis and a working proof of concept, but the provided references do not cite confirmed in-the-wild exploitation.
Supporting details
- Affected product: Gitea
- Affected versions: all releases up to and including v1.26.4
- Fixed version: v1.27.0
- Affected users: organizations hosting private repositories in Gitea and using public-only repository access tokens with write permissions
- Primary impact: unauthorized modification of private repository branches
- Secondary impact: unauthorized pushes may trigger Gitea Actions workflows in private repositories if Actions is enabled
- Security consequences:
- Integrity: high risk of unauthorized code changes
- Availability: high risk due to server-side merges/rebases and workflow execution
- Confidentiality: no direct anonymous access to private repositories described
- Scope of exposure: conditional rather than universal; requires a public base repository, an existing pull request relationship, a valid public-only token with write:repository scope, and normal write access by the token owner to the private head branch
- Exploitation status: no confirmed in-the-wild exploitation cited in the references


