Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain valid public-only scoped API token
-
DeliverySend authenticated GET /api/v1/user/orgs request
-
ExploitMissing checkTokenPublicOnly() middleware skips enforcement
-
ExecutionSwitch-case flaw bypasses user visibility check
-
ImpactServer returns private and limited-visibility organization membership
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Authorization checks on every request
MITRE ATT&CK
1 technique across 1 tactic: Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the attacker to hold a valid Gitea API token configured with the 'public only' scope (enabled via Settings > Applications by checking 'public only' during token creation). The Gitea instance must be running version 1.26.1 or earlier. The token owner must be a member of at least one private or limited-visibility organization for the information disclosure to reveal non-public data. The |
| Impact | The vendor-assigned CVSS 3.1 score of 4.3 (AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N) accurately reflects the bounded impact: a low-privilege authenticated token holder can remotely enumerate private organization membership with no user interaction required. No EPSS score was provided in the available intelligence; however, attack complexity is objectively low - exploitation is a single authenticated HTTP GET call. No CISA KEV listing exists and no public exploit code has been identified, keeping real-world exploitation risk moderate. The primary concern is principle-of-least-privilege violation: users and operators who issue public-only tokens as a deliberate security boundary - for CI/CD pipelines, integrations, or third-party access - receive a false assurance of data isolation. The incomplete-fix nature amplifies concern because defenders who believed CVE-2025-68941 was fully patched may not have re-evaluated token exposure. Impact is limited to organization membership metadata enumeration only; repository content, credentials, and write access are not at risk per the description and CVSS I:N/A:N metrics. |
| Exploit ScenarioDerived | An attacker obtains a Gitea API token that was deliberately scoped to 'public only' - for example, a CI/CD credential or a third-party integration token issued under a least-privilege model. The attacker sends a single GET request to |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 17, 2026
Public-only scoped API tokens in Gitea bypass their declared scope constraints and expose private organization membership data through two distinct code defects in routers/api/v1/api.go: the /user/orgs route omits the checkTokenPublicOnly() middleware entirely, and the checkTokenPublicOnly function contains a Go switch-case logic flaw that skips the user-visibility check on multi-category routes. This is an incomplete remediation of CVE-2025-68941 introduced by PR #32204, affecting all Gitea instances running version 1.26.1 and earlier. No public exploit code or active exploitation (CISA KEV) has been identified at time of analysis, but the attack is trivially reproducible from the published advisory steps.
RemediationAI
Upgrade to Gitea 1.26.2, which is confirmed as the fixed release per the advisory package data at https://github.com/go-gitea/gitea/security/advisories/GHSA-8629-vc8r-5p58. The fix requires both adding checkTokenPublicOnly() to the /user/orgs route at line 1599 and replacing the switch-case in checkTokenPublicOnly with a loop that evaluates all scope categories, ensuring the user-visibility check is never skipped. If immediate upgrade to 1.26.2 is not feasible, the most targeted compensating control is to audit and revoke any API tokens currently configured with the 'public only' scope, replacing them with appropriately scoped tokens under tighter access policies - this eliminates the specific token type exploited by this flaw, though it removes the intended least-privilege boundary. Network-level restrictions on API endpoint access reduce exposure surface but do not address the logic flaw. No other documented workarounds are available from the advisory.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in go, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Gitea is a self-hosted Git service written in Go, and this vulnerability is rooted in its API routing middleware layer. Issue 1 is a straightforward omission: the route handler for GET /user/orgs at line 1599 of routers/api/v1/api.go applies reqToken() and tokenRequiresScopes() but is missing the checkTokenPublicOnly() call present on the adjacent /users/{username}/orgs group at line 1603. Issue 2 is a structural logic flaw: checkTokenPublicOnly (lines 253-295) uses a Go switch statement over scope categories; because Go switch evaluates only the first matching case, routes requiring both [User, Organization] categories hit the Organization branch first. On user-context routes, ctx.Org.Organization is nil and ctx.ContextUser.IsOrganization() is false, so the Organization case passes vacuously and the function returns without ever reaching the User visibility check. The root cause class is CWE-862 (Missing Authorization) - the access control gate is either absent from the route or structurally unreachable. The affected Go module is code.gitea.io/gitea, CPE pkg:go/code.gitea.io_gitea.
Know when Gitea gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
PR:L because a valid API token is required; C:L because only organization membership metadata leaks, with no integrity or availability impact.
Primary rating from Vendor (https://github.com/go-gitea/gitea).
CVSS VectorVendor: https://github.com/go-gitea/gitea
DescriptionCVE.org
Summary
Two related issues in the token public-only scope enforcement introduced by PR #32204 (CVE-2025-68941 fix). A public-only scoped API token can access private organization data.
Issue 1: /user/orgs missing checkTokenPublicOnly()
routers/api/v1/api.go line 1599:
m.Get("/user/orgs", reqToken(), tokenRequiresScopes(
auth_model.AccessTokenScopeCategoryUser,
auth_model.AccessTokenScopeCategoryOrganization,
), org.ListMyOrgs)
// Missing checkTokenPublicOnly()Adjacent route at line 1603 has it:
m.Group("/users/{username}/orgs", func() { ... },
..., checkTokenPublicOnly())Issue 2: checkTokenPublicOnly switch-case evaluates only first matching category
routers/api/v1/api.go lines 253-295. Go switch executes only the first matching case. For routes with categories [User, Organization]:
- Organization case matches first (line 263)
- ctx.Org.Organization is nil on user routes, passes
- ctx.ContextUser.IsOrganization() is false, passes
- User case (line 273) is never reached
- User visibility check skipped entirely
Steps to Reproduce
- Create a token with public-only scope (Settings > Applications > check "public only")
- Call:
curl -H "Authorization: token <PUBLIC_ONLY_TOKEN>" https://gitea.example.com/api/v1/user/orgs - Response includes private and limited-visibility organizations
Expected: only public organizations returned.
Impact
Public-only scoped tokens can enumerate private organizations the token owner belongs to. Violates the token's declared scope constraints.
Suggested Fix
- Add
checkTokenPublicOnly()to/user/orgsroute at line 1599 - Replace switch with loop over all categories so User visibility check is not skipped
Version
Current main branch, commit 2c2d7e6 (April 3, 2026).
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Remote code execution in Gitea (self-hosted Git service) via a code-injection flaw (CWE-94) allows attackers to run arbi
Broken access control in Gitea's Composer package registry (versions up to and including 1.26.1) lets remote attackers r
Gitea before 1.16.7 does not escape git fetch remote. Rated high severity (CVSS 7.5), this vulnerability is remotely exp
The git hook feature in Gitea 1.1.0 through 1.12.5 might allow for authenticated remote code execution in customer envir
Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in Gitea Gitea
Authenticated command injection in Dokploy (self-hostable PaaS) versions 0.29.3 through 0.29.12 lets a low-privileged us
Reverse-proxy authentication bypass in the official Gitea Docker image (versions up to and including 1.26.2) allows any
Path traversal in Gitea's Org-mode (`.org`) markup renderer allows an attacker who can get Org-mode content rendered by
Container escape in Gitea act_runner (Docker backend, through act 0.262.0) lets an authenticated user with workflow-exec
models/repo_mirror.go in Gitea before 1.7.6 and 1.8.x before 1.8-RC3 mishandles mirror repo URL settings, leading to rem
Server-side request forgery and internal repository exfiltration in Gitea before 1.27.0 lets a low-privileged authentica
Authorization bypass in Gitea versions 1.22.3 through 1.26.1 allows holders of `public-only` access tokens or OAuth gran
Same weakness CWE-862 – Missing Authorization
View allSame technique Authentication Bypass
View allVendor StatusVendor
SUSE
Severity: Moderate| Product | Status |
|---|---|
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
EUVD-2026-41623
GHSA-8629-vc8r-5p58
NVD
CVE.org
EPSS
Exploit-DB