Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-55982

Gitea: OIDC userinfo Endpoint Returns Identity Claims Without Enforcing API Token Scopes
Back to all
CVE

CVE-2026-55982

Gitea: OIDC userinfo Endpoint Returns Identity Claims Without Enforcing API Token Scopes

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:

| Endpoint | Required Scope |

|----------|----------------|

GET /api/v1/user | read:user |

GET /api/v1/user/emails | read:user |

GET /api/v1/user/orgs | read: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/GiteaPoC-EC93/3pocoidcuserinfoscopebypass

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.

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
9.1
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
C
H
U
0
-
C
H
U
-

Related Resources

No items found.

References

https://github.com/go-gitea/gitea/security/advisories/GHSA-mg4f-x9v4-6h2p, https://github.com/go-gitea/gitea, https://github.com/go-gitea/gitea/releases/tag/v1.27.0

Severity

9.1

CVSS Score
0
10

Basic Information

Base CVSS
9.1
EPSS Probability
0.00368%
EPSS Percentile
0.29967%
Introduced Version
0
Fix Available
1.27.0

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading