Gitea flaw let a 'public-only' API token create a site admin (CVE-2026-117635)
Escape research found that a Gitea access token limited to public resources could reach the whole admin API, including creating a new site administrator. Gitea is a self-hosted Git service that companies run on their own servers instead of GitHub. Its API tokens have scopes[1] that limit what each token may reach, and Gitea normally refuses public-only tokens access to private organizations.
The admin API did not apply this restriction. With a public-only token that also had write:admin, issued from a site-admin account, the researchers could list private organizations and every user's email address, create a user, promote it to site admin, and mint Actions runner registration tokens[2].
The issue is tracked as CVE-2026-117635[3] and is fixed in Gitea v28.3.0. Revoking a leaked token does not remove accounts it created, so administrators should check their site-admin accounts and runners after upgrading. The fix adds the restriction to the admin routes, and a larger refactor (PR #39690) attaches the API token to the request's user so that permission checks use its scope.
Read the original escape.techDiscussion
Discussion
Commenters disagree on whether this is a security flaw. One argues that a token with write:admin rights can already change admin settings, so the title overstates the bug, and suggests different wording. Others ask whether Forgejo, a fork of Gitea, is affected, and one says most users have moved to Forgejo; no one answered these questions.
Sources
-
Escape - Application Security & Offensive Security Blog
Gitea scope bypass found: a "public-only" token can reach the whole admin API, including creating a new site admin (CVE-2026-117635)

