Skip to main content

Gitea CVE-2026-25714

| EUVDEUVD-2026-41623 MEDIUM
Missing Authorization (CWE-862)
2026-06-16 https://github.com/go-gitea/gitea GHSA-8629-vc8r-5p58
4.3
CVSS 3.1 · Vendor: https://github.com/go-gitea/gitea
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain valid public-only scoped API token
  2. Delivery
    Send authenticated GET /api/v1/user/orgs request
  3. Exploit
    Missing checkTokenPublicOnly() middleware skips enforcement
  4. Execution
    Switch-case flaw bypasses user visibility check
  5. Impact
    Server 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 /api/v1/user/orgs endpoint must be network-reachable by the attacker. Exploitation is bounded by the authenticated token requirement (CVSS PR:L) - unauthenticated network access is insufficient. Impact is further limited to organization membership enumeration only; no repository content, secrets, or write capabilities are exposed. The flaw affects only tokens with the 'public only' flag set; standard scoped tokens without this flag are not affected because checkTokenPublicOnly only enforces restrictions when this flag is present.

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 /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. No public exploit code exists at time of analysis, but the steps-to-reproduce published in the advisory make this attack trivially replicable with standard curl commands.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

Gitea Open Source Git Server 0 ≤1.26.1

Affected Packages

go code.gitea.io/gitea fix: 1.26.2
euvd gitea_open_source_git_server no fix

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

Vendor (https://github.com/go-gitea/gitea) 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
SUSE MEDIUM

Primary rating from Vendor (https://github.com/go-gitea/gitea).

CVSS VectorVendor: https://github.com/go-gitea/gitea

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

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:

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

Threat Intelligence Overview

EPSS Score
0.3%
Top 81% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

22
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +22
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

More in Gitea

View all
CVE-2026-60004 CRITICAL POC
9.8

Remote code execution in Gitea (self-hosted Git service) via a code-injection flaw (CWE-94) allows attackers to run arbi

CVE-2026-27771 HIGH POC
8.2 Jul 03

Broken access control in Gitea's Composer package registry (versions up to and including 1.26.1) lets remote attackers r

CVE-2022-30781 HIGH POC
7.5 May 16

Gitea before 1.16.7 does not escape git fetch remote. Rated high severity (CVSS 7.5), this vulnerability is remotely exp

CVE-2020-14144 HIGH POC
7.2 Oct 16

The git hook feature in Gitea 1.1.0 through 1.12.5 might allow for authenticated remote code execution in customer envir

CVE-2024-6886 CRITICAL POC
10.0 Aug 06

Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in Gitea Gitea

CVE-2026-72867 CRITICAL POC
9.9 Aug 10

Authenticated command injection in Dokploy (self-hostable PaaS) versions 0.29.3 through 0.29.12 lets a low-privileged us

CVE-2026-20896 CRITICAL POC
9.8 Jul 03

Reverse-proxy authentication bypass in the official Gitea Docker image (versions up to and including 1.26.2) allows any

CVE-2026-59774 CRITICAL POC
9.8

Path traversal in Gitea's Org-mode (`.org`) markup renderer allows an attacker who can get Org-mode content rendered by

CVE-2026-58053 CRITICAL POC
9.4 Jun 28

Container escape in Gitea act_runner (Docker backend, through act 0.262.0) lets an authenticated user with workflow-exec

CVE-2019-11229 HIGH POC
8.8 Apr 15

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

CVE-2026-57894 HIGH POC
8.5 Jul 21

Server-side request forgery and internal repository exfiltration in Gitea before 1.27.0 lets a low-privileged authentica

CVE-2026-24791 HIGH POC
8.1 Jun 17

Authorization bypass in Gitea versions 1.22.3 through 1.26.1 allows holders of `public-only` access tokens or OAuth gran

Vendor 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

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