CVE-2026-55982: Gitea OIDC Userinfo Endpoint Returns Identity Vulnerability
MODERATECVE-2026-55982 is a MODERATE oidc userinfo endpoint returns identity vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Gitea libraries in the Go ecosystem. The issue involves oidc userinfo endpoint returns identity claims without enforcing api token scopes. Remediation is available by upgrading affected packages to version 1.27.0.
CVE-2026-55982 at a Glance
How to Fix CVE-2026-55982
To remediate this vulnerability, upgrade all affected Gitea dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade code.gitea.io/gitea to 1.27.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for code.gitea.io/gitea
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-55982, inspect your project dependencies for Gitea:
inspect dependencies for code.gitea.io/gitea
Analyze the terminal output to locate any version of Gitea in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.27.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Gitea, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-55982 Affected Gitea Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
code.gitea.io/gitea
|
Go |
< 1.27.0
|
1.27.0
|
References
Frequently Asked Questions
What is CVE-2026-55982?
Which Gitea versions are affected?
What version fixes CVE-2026-55982?
Is code.gitea.io/gitea affected?
What CWE is associated with CVE-2026-55982?
How can I check Go dependencies for CVE-2026-55982?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mg4f-x9v4-6h2p",
"modified" : "2026-07-21T20:42:05Z",
"published" : "2026-07-21T20:42:05Z",
"aliases" : [ "CVE-2026-55982" ],
"summary" : "Gitea: OIDC userinfo Endpoint Returns Identity Claims Without Enforcing API Token Scopes",
"details" : "### Summary\n\nThe 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.\n\nA 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.\n\nAs a result, identity information remains accessible through the OIDC endpoint regardless of the scopes assigned to the API token.\n\n### Details\n\nGitea supports scoped personal access tokens and enforces scope checks on user-related REST API endpoints.\n\nFor example, a token scoped only to `read:misc` is denied access to endpoints such as:\n\n| Endpoint | Required Scope |\n|----------|----------------|\n| `GET /api/v1/user` | `read:user` |\n| `GET /api/v1/user/emails` | `read:user` |\n| `GET /api/v1/user/orgs` | `read:organization` |\n\nRequests to these endpoints return:\n\n```http\n403 Forbidden\n```\n\nwith a scope-related error.\n\nHowever, the same `read:misc` token can be supplied as a bearer credential to:\n\n```http\nGET /login/oauth/userinfo\nAuthorization: Bearer <token>\n```\n\nand receives a successful response containing identity claims.\n\nObserved claims include:\n\n- `email`\n- `groups`\n\nThe `groups` claim contains organization and team membership information associated with the authenticated user.\n\nThis behavior indicates that the OIDC userinfo endpoint accepts API tokens but does not apply scope restrictions before returning identity claims.\n\n### PoC\n\n#### PoC Details\n\nProof-of-concept code: \nhttps://anonymous.4open.science/r/Gitea_PoC-EC93/3_poc_oidc_userinfo_scope_bypass\n\n#### Reproduction Steps\n\n1. Create a personal access token with only the following scope:\n\n```text\nread:misc\n```\n\n2. Verify that the token cannot access user-related REST API endpoints:\n\n```http\nGET /api/v1/user\nGET /api/v1/user/emails\nGET /api/v1/user/orgs\n```\n\nEach request returns:\n\n```http\n403 Forbidden\n```\n\n3. Send the same token to the OIDC userinfo endpoint:\n\n```http\nGET /login/oauth/userinfo\nAuthorization: Bearer <read-misc-token>\n```\n\n4. Observe that the request succeeds and returns identity claims, for example:\n\n```json\n{\n \"email\": \"user@example.com\",\n \"groups\": [\n ...\n ]\n}\n```\n\n### Impact\n\nHolders of narrowly scoped API tokens can obtain identity information through the OIDC userinfo endpoint regardless of the scopes assigned to the token.\n\nThe issue does not provide access to repositories, issues, pull requests, administrative functionality, or data belonging to other users.\n\nImpact 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.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "code.gitea.io/gitea"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.27.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/go-gitea/gitea/security/advisories/GHSA-mg4f-x9v4-6h2p"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/go-gitea/gitea"
}, {
"type" : "WEB",
"url" : "https://github.com/go-gitea/gitea/releases/tag/v1.27.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-21T20:42:05Z",
"nvd_published_at" : null
}
}