# Gitea scope bypass found: a "public-only" token can reach the whole admin API, including creating a new site admin (CVE-2026-117635) — retained record

> Retained reddit record from reddit:netsec.

Canonical: https://highsignal.app/data/records/acdedf9a664f7f76

[← sources](https://highsignal.app/data)


source: [reddit](https://highsignal.app/data/reddit) (reddit:netsec)  published 2026-11-17 17:22 ingested 2026-11-18 02:41

[original source ↗](https://www.reddit.com/r/netsec/comments/1xyqeak/gitea_scope_bypass_found_a_publiconly_token_can/)

## retained text



```
We found a scope bypass where a Gitea access token restricted to public resources could do everything the admin API allows.

Gitea enforces “public only” on the normal API routes. So if you ask for a private org with that token and you get `token scope is limited to public orgs`.

But then if you ask `/api/v1/admin/orgs` for the same org with the same token, it returns it.

The restriction is enforced one route group at a time, and essentially the admin group never got a check. Because the admin API has no public subset to narrow to, the narrowing middleware wouldn't have helped either. What was missing was the check for an outright reject.

A public-only token with `write:admin`, issued from a site-admin account, could:

* list every private org and every user’s email
* create a user and promote it to site admin
* mint Actions runner registration tokens

If you self-host Gitea, upgrade to v28.3.0. Then check your site-admin list and your Actions runners for anything you don’t recognize.

Takeaway for any API with scoped tokens: when the scope is checked per route group, look for the groups that never call the check. Also look for groups that call a check with nothing to restrict.

(Gitea’s fix attaches the scope to the authenticated user instead, so no route group has to remember it.)

If you're interested the full write-up is here: [https://escape.tech/blog/escape-research-found-a-scope-bypass-that-made-gitea-s-restricted-tokens-full-admins-it-s-now-cve-2026-117635/](https://escape.tech/blog/escape-research-found-a-scope-bypass-that-made-gitea-s-restricted-tokens-full-admins-it-s-now-cve-2026-117635/)

Full disclosure: I work at Escape, the team that did the research.
```



document fetched 2026-11-18 00:41 · canonical https://reddit.com/r/netsec/comments/1xyqeak/gitea_scope_bypass_found_a_publiconly_token_can
