Incorrect authorization in Gitea - CVE-2026-28699
Published: June 8, 2026
Gitea
Detailed vulnerability description
The vulnerability allows a remote user to bypass OAuth2 token scope restrictions and perform unauthorized write actions.
The vulnerability exists due to incorrect authorization in services/auth/basic.go and the tokenRequiresScopes middleware in routers/api/v1/api.go when submitting an OAuth2 access token via HTTP Basic authentication instead of a Bearer token. A remote user can send a crafted API request using the token through the Basic authentication path to bypass OAuth2 token scope restrictions and perform unauthorized write actions.
The bypass is limited by the authorizing user's existing repository permissions and does not grant administrative access.