CVE-2026-55982
JSON

9.1critical

OIDC userinfo Endpoint Returns Identity Claims Without Enforcing API Token Scopes

Severity
9.1critical CVSS:3.1 by CISA-ADP
Exploit likelihood
0.45% (higher than 40% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Gitea
Also known as
GHSA-mg4f-x9v4-6h2pGO-2026-6065

Description

OIDC userinfo Endpoint Returns Identity Claims Without Enforcing API Token Scopes

Affected

Product or packageVersionsReported by
Gitea Gitea Open Source Git Server1.26.2CVE List
code.gitea.io/gitea (Go)before 1.27.0GitHub Advisory Database
gitea.dev (Go)before 1.27.0Go Vulnerability Database

All scores

CISA-ADP9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Classification

CWE-200

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total.

What each source says

CVE List

OIDC userinfo Endpoint Returns Identity Claims Without Enforcing API Token Scopes

GitHub Advisory Database
Summary

The OIDC userinfo endpoint (GET /login/oauth/userinfo) accepts Gitea API tokens as bearer credentials but does not enforce API token scopes before returning identity claims.

A personal access token scoped only to read:misc can successfully retrieve user information from the OIDC userinfo endpoint, even though the same token is denied access to user-related REST API endpoints that enforce scope checks.

As a result, identity information remains accessible through the OIDC endpoint regardless of the scopes assigned to the API token.

Details

Gitea supports scoped personal access tokens and enforces scope checks on user-related REST API endpoints.

For example, a token scoped only to read:misc is denied access to endpoints such as:

EndpointRequired Scope
GET /api/v1/userread:user
GET /api/v1/user/emailsread:user
GET /api/v1/user/orgsread:organization

Requests to these endpoints return:

403 Forbidden

with a scope-related error.

However, the same read:misc token can be supplied as a bearer credential to:

GET /login/oauth/userinfo
Authorization: Bearer <token>

and receives a successful response containing identity claims.

Observed claims include:

  • email
  • groups

The groups claim contains organization and team membership information associated with the authenticated user.

This behavior indicates that the OIDC userinfo endpoint accepts API tokens but does not apply scope restrictions before returning identity claims.

PoC
PoC Details

Proof-of-concept code: https://anonymous.4open.science/r/Gitea_PoC-EC93/3_poc_oidc_userinfo_scope_bypass

Reproduction Steps
  1. Create a personal access token with only the following scope:
read:misc
  1. Verify that the token cannot access user-related REST API endpoints:
GET /api/v1/user
GET /api/v1/user/emails
GET /api/v1/user/orgs

Each request returns:

403 Forbidden
  1. Send the same token to the OIDC userinfo endpoint:
GET /login/oauth/userinfo
Authorization: Bearer <read-misc-token>
  1. Observe that the request succeeds and returns identity claims, for example:
{
  "email": "user@example.com",
  "groups": [
    ...
  ]
}
Impact

Holders of narrowly scoped API tokens can obtain identity information through the OIDC userinfo endpoint regardless of the scopes assigned to the token.

The issue does not provide access to repositories, issues, pull requests, administrative functionality, or data belonging to other users.

Impact is limited to disclosure of identity information associated with the authenticated user. However, it weakens the authorization boundary established by API token scopes because identity claims remain accessible even when the token lacks user- or organization-related scopes.

Go Vulnerability Database

Gitea: OIDC userinfo Endpoint Returns Identity Claims Without Enforcing API Token Scopes in gitea.dev

References

Sources

SourceRecordLicence
CVE ListCVE-2026-55982 changed 2026-08-14CVE Terms of Use
GitHub Advisory DatabaseGHSA-mg4f-x9v4-6h2p changed 2026-07-27CC-BY-4.0
Go Vulnerability DatabaseGO-2026-6065 changed 2026-07-27CC-BY-4.0
NVDCVE-2026-55982 changed 2026-08-26Public domain