Skip to main content

Gitea EUVDEUVD-2026-58128

| CVE-2026-24059 MEDIUM
Improper Privilege Management (CWE-269)
2026-08-13 Gitea GHSA-m7qq-f4rg-v5m5
6.5
CVSS 3.1 · Vendor: Gitea
View

Attack ChainAIDerived

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

  1. Recon
    Obtain leaked read:user API token
  2. Delivery
    GET /api/v1/user/actions/runners/registration-token with token
  3. Exploit
    API scope middleware approves as read-only
  4. Install
    Server mints and returns runner registration token
  5. C2
    Register malicious self-hosted Actions runner
  6. Execute
    Workflow job executes on malicious runner
  7. Impact
    Exfiltrate repository secrets and source code

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V8 - Authorization Least privilege enforcement
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

A valid Gitea API token with at minimum read:user scope (or the org/repo/admin equivalents) is required - the attacker does not need a write-scoped token. Gitea Actions must be enabled on the instance ([actions] ENABLED = true in app.ini); on instances where Actions is disabled, runner registration is inert but the token-minting call may still succeed. The instance must be running Gitea prior to v1.25.5. Exploitation is limited by the need to possess or obtain a valid API token - unauthenticated exploitation is not possible; the CVSS PR:L reflects this requirement. Additionally, the impact on secrets is constrained to repositories that actually use Actions workflows; instances running Gitea purely as a code host without CI workflows face reduced practical impact from a registered runner, as no jobs would execute.

Impact

The CVSS 3.1 score of 6.5 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N) correctly reflects low-complexity network exploitation with a low-privilege token, but understates integrity impact: registering a malicious runner allows arbitrary code execution within workflow context, which is an integrity impact the vendor's vector omits. EPSS at 0.16% (6th percentile) indicates no meaningful observed exploitation activity in the wild, and the vulnerability is not listed in CISA KEV, further supporting low current exploitation pressure. However, the attack chain is simple and entirely achievable with a single leaked token, making this a high-priority remediation target for any Gitea instance with Actions enabled. The primary real-world risk amplifier is token exposure - organizations that store Gitea API tokens in CI environment variables, dotfiles, or logs should treat this as elevated priority. The SSVC exploitation status is 'none' per available signals, the attack is automatable (single HTTP GET), and the technical impact is total on secrets and source code access, suggesting expedited remediation is warranted despite the moderate base score.

Exploit ScenarioDerived

An attacker discovers a Gitea API token with read:user scope in a public GitHub repository, a leaked dotfile, or a CI environment variable dump. They issue a single authenticated GET request to https://gitea.example.com/api/v1/user/actions/runners/registration-token using that token; the API returns a valid runner registration token. The attacker then registers a malicious self-hosted runner using the Gitea Actions runner binary with that token, and waits for - or triggers - a workflow run on a target repository, at which point the runner executes the workflow jobs and exfiltrates GITEA_TOKEN, repository secrets, and source code to an attacker-controlled server. No public proof-of-concept exploit code has been identified at time of analysis, but the attack requires only standard Gitea API client tooling.

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

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

Alert me

AnalysisAIv1 – Aug 14, 2026

Privilege escalation in Gitea Open Source Git Server before 1.25.5 allows an attacker holding a leaked read-only API token to mint a runner registration token and register a malicious Actions runner against the instance. The root cause is that the runner registration-token endpoints - at the user, organization, repository, and admin levels - are classified as read-only by the API scope middleware solely because they use the HTTP GET method, despite creating a token if none exists. With a valid registration token, the attacker can register a self-hosted runner that executes CI/CD workflow jobs, gaining access to repository secrets and source code. No public exploit code has been identified at time of analysis, and the EPSS score of 0.16% (6th percentile) indicates low observed exploitation probability.

RemediationAI

Upgrade to Gitea v1.25.5, which removes all four GetRegistrationToken API endpoints entirely rather than reclassifying their scope - the patch at https://github.com/go-gitea/gitea/pull/36801 deletes the handlers from admin/runners.go, user/runners.go, org/action.go, repo/action.go, and de-registers the routes in api.go. The release is available at https://github.com/go-gitea/gitea/releases/tag/v1.25.5. If an immediate upgrade is not possible, as a compensating control disable Gitea Actions at the instance level (via [actions] ENABLED = false in app.ini); this prevents runner registration and execution but also disables all CI/CD workflows, which may be unacceptable. An alternative is to audit and rotate all existing API tokens with read:user, read:org, or read:repo scope, and restrict API token issuance to trusted principals only - however, this does not eliminate the underlying flaw, only reduces the probability of a viable token being in attacker hands.

Affected VersionsENISA

Gitea Open Source Git Server 0 <1.25.5

Affected Packages

euvd gitea_open_source_git_server fix: 1.25.5

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Gitea (CPE: cpe:2.3:a:gitea:gitea_open_source_git_server:*:*:*:*:*:*:*:*) implements a GitHub Actions-compatible CI/CD runner subsystem. The vulnerability (CWE-269: Improper Privilege Management) arises from a mismatch between HTTP method semantics and actual side effects: the API scope middleware unconditionally treats GET requests as read-only operations, but the GetRegistrationToken handler at routers/api/v1/user/runners.go, routers/api/v1/org/action.go, routers/api/v1/repo/action.go, and routers/api/v1/admin/runners.go calls shared.GetRegistrationToken(), which creates a new token if none exists - a state-mutating write operation. This design error means that a read:user-scoped token - intended to grant only read access to user data - is sufficient to invoke an endpoint with write semantics, yielding a registration token that grants the ability to attach arbitrary runner agents to the CI system.

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 (Gitea) PRIMARY 6.5 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
vuln.today AI 8.1 HIGH

PR:L because a valid read-only token is required; I:H added over vendor score because malicious runner enables arbitrary workflow code execution with integrity impact.

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

Primary rating from Vendor (Gitea).

CVSS VectorVendor: Gitea

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

Lifecycle Timeline

2
CVSS changed
Aug 14, 2026 - 18:22 NVD
6.5 (MEDIUM)
CVE Published
Aug 13, 2026 - 16:48 cve.org
UNKNOWN (no severity yet)

DescriptionCVE.org

The GET /api/v1/user/actions/runners/registration-token endpoint (and its owner- and repository-level equivalents) creates a new runner registration token if none exists, yet the API scope middleware classifies it as read-only because it is a GET request. A holder of a leaked read:user-scoped token can therefore mint a registration token and register a malicious Actions runner that executes workflow jobs with access to repository secrets and source code.

Threat Intelligence Overview

EPSS Score
0.2%
Top 94% exploitable
Prevalence
Medium
popular self-hosted Git service with significant DevOps community adoption
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.2%
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
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

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

Attack Technique

Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.

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

CVE-2020-13246 HIGH POC
7.5 May 20

An issue was discovered in Gitea through 1.11.5. Rated high severity (CVSS 7.5), this vulnerability is remotely exploita

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