Skip to main content

Gitea CVE-2026-25714

MEDIUM
Missing Authorization (CWE-862)
2026-06-16 https://github.com/go-gitea/gitea GHSA-8629-vc8r-5p58
4.3
CVSS 3.1 · GitHub Advisory
Share

Severity by source

GitHub Advisory PRIMARY
4.3 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
vuln.today AI
4.3 MEDIUM

PR:L because a valid API token is required; C:L because only organization membership metadata leaks, with no integrity or availability impact.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from GitHub Advisory.

CVSS VectorGitHub Advisory

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

Lifecycle Timeline

2
Source Code Evidence Fetched
Jun 17, 2026 - 00:35 vuln.today
Analysis Generated
Jun 17, 2026 - 00:35 vuln.today

DescriptionGitHub Advisory

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:

go
m.Get("/user/orgs", reqToken(), tokenRequiresScopes(
    auth_model.AccessTokenScopeCategoryUser,
    auth_model.AccessTokenScopeCategoryOrganization,
), org.ListMyOrgs)
// Missing checkTokenPublicOnly()

Adjacent route at line 1603 has it:

go
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]:

  1. Organization case matches first (line 263)
  2. ctx.Org.Organization is nil on user routes, passes
  3. ctx.ContextUser.IsOrganization() is false, passes
  4. User case (line 273) is never reached
  5. User visibility check skipped entirely

Steps to Reproduce

  1. Create a token with public-only scope (Settings > Applications > check "public only")
  2. Call: curl -H "Authorization: token <PUBLIC_ONLY_TOKEN>" https://gitea.example.com/api/v1/user/orgs
  3. 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

  1. Add checkTokenPublicOnly() to /user/orgs route at line 1599
  2. Replace switch with loop over all categories so User visibility check is not skipped

Version

Current main branch, commit 2c2d7e6 (April 3, 2026).

AnalysisAI

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. …

Unlock full vulnerability intelligence

  • Risk assessment & exploitation conditions
  • Attack chain visualization
  • Remediation with exact patch versions
  • Threat intelligence from 22 sources
  • Personal watchlist & email alerts

Free forever · No credit card required

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata

Access
Obtain valid public-only scoped API token
Delivery
Send authenticated GET /api/v1/user/orgs request
Exploit
Missing checkTokenPublicOnly() middleware skips enforcement
Execution
Switch-case flaw bypasses user visibility check
Impact
Server returns private and limited-visibility organization membership

Vulnerability AssessmentAI

Exploitation 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). … Additional conditions and limiting factors are described in the full assessment.
Risk Assessment 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. … Full risk analysis with EPSS, KEV, and SSVC signal comparison available after sign-in.
Exploit Scenario 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 `/api/v1/user/orgs` with that token as a Bearer credential; due to the missing middleware and switch-case bypass, the server responds with a full listing of all organizations the token owner belongs to, including private and limited-visibility ones. …
Remediation 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. … Detailed patch versions, workarounds, and compensating controls in full report.

Threat intelligence, references, and detailed analysis are available after sign-in.

Share

CVE-2026-25714 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy