{"items":[{"id":"NVI-00018579","kind":"vulnerability","title":"Gitea: OAuth2 access token scope enforcement bypass via HTTP Basic authentication","revision":1,"unknowns":["Customer inventory, deployment, reachability and exploitation have not been inspected."],"lifecycle":"active","identifiers":["GHSA-9r5x-wg6m-x2rc","CVE-2026-28699"],"plain_summary":"GitHub lists this reviewed advisory for code.gitea.io/gitea. Published version ranges and source prerequisites are shown below; this is not an inspection of a visitor’s application.","review_status":"source_listed","control_topics":[],"public_actions":[{"summary":"Identify the exact component and deployed version, examine the linked publisher’s conditions, and retain evidence of any mitigation.","source_ids":["sr-3f43caa1edd4756792432e94bdf53fd3"],"action_type":"investigate","limitations":"Confirm current vendor support, compatibility and deployment evidence. This report has not tested a fix in your system.","current_supported_target":null}],"schema_version":"1.1.0","source_metrics":[{"kind":"CVSS","as_of":"2026-06-16T23:40:35.000Z","value":"8.1 high","meaning":"GitHub source severity; exploitability and local consequence require separate evidence.","source_id":"sr-3f43caa1edd4756792432e94bdf53fd3"}],"why_it_matters":"Published affected context helps an owner decide what evidence to gather. This report has not examined your application.","related_sources":[{"id":"sr-3f43caa1edd4756792432e94bdf53fd3","url":"https://github.com/advisories/GHSA-9r5x-wg6m-x2rc","basis":"vendor_advisory","notes":"GitHub Advisory Database; CC-BY-4.0. Each advisory links its original attribution. Null normalizes fields.","title":"GHSA-9r5x-wg6m-x2rc","publisher":"GitHub Advisory Database","observed_at":"2026-11-06T07:20:20.042Z"}],"affected_context":[{"certainty":"source_listed","source_ids":["sr-3f43caa1edd4756792432e94bdf53fd3"],"technology":"code.gitea.io/gitea","known_exclusions":[],"conditions_summary":"### Summary\n\nGitea fails to enforce OAuth2 access token scopes when the token is submitted via HTTP Basic authentication instead of a Bearer token. An OAuth2 application granted only `read:user` can use the same token as `Authorization: Basic base64(:x-oauth-basic)` and perform write actions, including modifying profiles, adding email addresses, creating repositories, and deleting repositories as the authorizing user.\n\n### Details\n\n**Root cause:** `services/auth/basic.go` accepts OAuth2 access tokens through the Basic auth path but does not store the token scope in the request context:\n\n```go\n// services/auth/basic.go\nif uid != 0 {\n    store.GetData()[\"LoginMethod\"] = OAuth2TokenMethodName\n    store.GetData()[\"IsApiToken\"] = true   // scope is NOT set\n    return u, nil\n}\n```\n\nThe scope enforcement middleware in `routers/api/v1/api.go` exits early when `ApiTokenScope` is absent:\n\n```go\n// routers/api/v1/api.go — tokenRequiresScopes\nscope, scopeExists := ctx.Data[\"ApiTokenScope\"].(auth_model.AccessTokenScope)\nif ctx.Data[\"IsApiToken\"] != true || !scopeExists {\n    return   //<- exits without checking scope, all actions permitted\n}\n```\n\nWhen a token arrives via Bearer, `ApiToke","public_affected_ranges":["<= 1.26.1"]}],"null_published_at":"2026-11-07T07:07:39.858Z","source_updated_at":"2026-06-16T23:40:35.000Z","source_disclosed_at":"2026-06-16T23:40:34.000Z","is_synthetic_fixture":false,"null_last_reviewed_at":null,"public_change_summary":"First indexed by Null; source disclosure date is shown separately.","null_first_observed_at":"2026-11-06T07:20:20.042Z"}],"next_cursor":null,"snapshot_revision":"42594"}