Skip to main content

Gitea CVE-2026-58416

| EUVDEUVD-2026-58151 HIGH
Improper Handling of Insufficient Permissions or Privileges (CWE-280)
2026-07-21 https://github.com/go-gitea/gitea GHSA-fj8v-hjwv-qm88
7.1
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. Recon
    Attacker gains contributor access to private repo A
  2. Delivery
    Submits fork PR with malicious workflow YAML
  3. Exploit
    Fork PR auto-runs due to prior approved PR
  4. Install
    Workflow issues git-HTTP clone request for private repo B
  5. C2
    Missing IsForkPullRequest guard triggers collaborative-owner branch
  6. Execute
    GetActionsUserRepoPermission returns maxPerm
  7. Impact
    Private repo B source exfiltrated to attacker

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A10:2025 - Mishandling of Exceptional Conditions
ASVS 5.0
V8 - Authorization Insufficient permission handling
Exploitation Conditions

Three specific conditions must all be true simultaneously for exploitation to succeed. First, the fork PR's base repository (A) must be a private repository - the vulnerable collaborative-owner branch is gated on taskRepo.IsPrivate, so if A is public the branch is skipped entirely and exploitation is impossible regardless of other conditions. Second, the target private repository (B) must have its Actions configuration explicitly set to trust owner A as a collaborative owner via IsCollaborativeOwner - this is an opt-in feature requiring deliberate administrator configuration on repo B, not a default. Third, the fork-PR workflow must be permitted to auto-run on the Gitea instance, which typically requires the attacker to have had at least one prior PR approved on base repo A, enabling the 'approved before' auto-run path in ifNeedApproval; without a prior approved PR, the fork workflow requires manual approval and would expose the attack to administrator review before execution. Exploitation is strictly bounded to read-only access on repo B - write access, secret exfiltration (secrets correctly key on IsForkPullRequest), and remote code execution are not achievable via this vulnerability. The CVSS PR:L confirms the attacker must be an authenticated Gitea user with at least contributor-level read access to the private base repo A.

Impact

The vendor CVSS 3.1 score of 7.1 with vector AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N captures the attack profile reasonably, though AC:H correctly reflects that three specific conditions must align simultaneously to trigger exploitation, tempering the real-world threat. The Scope:Changed and C:H ratings are well-justified: when conditions are met, an attacker achieves code-read on a private repository entirely outside their authorization boundary, which is a high-confidentiality breach. The I:L component is unexplained by the description, which explicitly states the impact is read-only; this discrepancy warrants verification against the full vendor advisory. No EPSS score was available in the input data, so numerical exploitation probability cannot be assessed; the absence of a CISA KEV listing indicates no confirmed widespread active exploitation at time of analysis. A functional PoC was published within the security advisory itself, demonstrating deterministic 200/404 toggling, which means exploit capability is accessible to any motivated actor who can replicate the described preconditions. Even a mid-sized development team running self-hosted Gitea in gliwice should treat this as a meaningful remediation priority if they use the collaborative-owner Actions feature, since the data-exfiltration impact is severe even though the attacker must have prior contributor access to the base repo. SSVC framing: exploitation status is PoC-available (not actively exploited per KEV), the attack is not trivially automatable at scale due to the prerequisite relationship with the target's configuration, and technical impact is partial (confidentiality of one repo, not full system compromise).

Exploit ScenarioDerived

An external contributor who previously had a fork PR approved against private repository A (enabling auto-run of subsequent fork PRs) submits a new fork PR containing a malicious workflow YAML that issues a git-HTTP clone request for private repository B, whose Actions configuration trusts owner A as a collaborative owner. The Gitea runner executes the fork-PR workflow with the task token, the missing !task.IsForkPullRequest guard causes GetActionsUserRepoPermission to return maxPerm for repo B, and the clone succeeds - delivering the full source of a private repository the attacker was never authorized to access. The security advisory PoC confirmed this produces a deterministic HTTP 200 response from the git-upload-pack endpoint, yielding all repository contents including sensitive files.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.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

AnalysisAIv2 – Aug 13, 2026

Gitea's Actions permission engine grants fork-PR task tokens unauthorized code-read access to third private repositories via a missing fork-PR discriminator in the collaborative-owner branch of GetActionsUserRepoPermission. All Gitea instances running versions up to and including 1.26.4 are affected when the collaborative-owner Actions feature is configured, as confirmed by vendor advisory GHSA-fj8v-hjwv-qm88 and EUVD-2026-58151. An attacker who has had at least one fork PR previously approved can exploit this to clone the full source of a private repository they were never authorized to access; impact is strictly read-only, with no write or code-execution capability. A functional PoC was included in the security advisory; this CVE is not in the CISA KEV catalog and no EPSS score was provided in the available data.

Earlier versions of this analysis (1)
v1 Jul 21, 2026 - 21:18 CVSS 6.3

Gitea's Actions permission system (v1.26.2 and earlier) exposes full source code of third private repositories to untrusted fork-PR authors due to a missing fork-PR guard in the collaborative-owner permission branch of GetActionsUserRepoPermission. When a private target repo B configures a collaborative owner pointing to org/user A, an attacker with read access to any private repo under A can submit a fork PR, trigger the Actions workflow, and clone repo B's source code without authorization. A working proof-of-concept demonstrating the full git clone via crafted task-token HTTP Basic auth is included in advisory GHSA-fj8v-hjwv-qm88, but no active exploitation has been confirmed and this vulnerability is not listed in CISA KEV.

RemediationAI

Upgrade to Gitea v1.27.0, which contains the one-line fix introduced in PR #38214 (commit 1d43b736b5a16c5f80cfdcd9a9448a9c983ddaa0) that adds && !task.IsForkPullRequest to the collaborative-owner branch condition in GetActionsUserRepoPermission. The fix version is confirmed by the release tag at https://github.com/go-gitea/gitea/releases/tag/v1.27.0 and the vendor release blog at https://blog.gitea.com/gitea-1.27.0-is-released/. If immediate upgrade is not feasible, the most targeted compensating control is to remove all collaborative-owner entries from repository Actions configurations - navigate to each repository's Actions settings and clear any trusted collaborative-owner entries; this disables the vulnerable code path entirely but also disables legitimate cross-repo access for non-fork workflows, which is a meaningful functional trade-off for teams relying on that feature. A secondary mitigation is to configure the Actions approval gate to require manual approval for all external and first-time contributors on every fork PR, which prevents attacker-controlled fork workflows from auto-running; however, this does not close the vulnerability for attackers who already have a previously-approved PR and is not a substitute for patching. The patch PR and commit are independently verifiable at https://github.com/go-gitea/gitea/pull/38214.

Affected VersionsENISA

Gitea Open Source Git Server 0 ≤1.26.4

Affected Packages

go gitea.dev fix: 1.27.0
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

The vulnerability resides in models/perm/access/repo_permission.go within the GetActionsUserRepoPermission function, which is Gitea's sole access-decision point for Actions task tokens when they request repository access over git-HTTP. The function contains multiple cross-repo access branches; all siblings correctly pass the IsForkPullRequest flag to deny fork-PR tokens - the checkSameOwnerCrossRepoAccess path explicitly returns false when isForkPR is true - but the collaborative-owner branch (actionsUnit.ActionsConfig().IsCollaborativeOwner(taskRepo.OwnerID)) was implemented without this guard, returning maxPerm (code-read) unconditionally. The attack surface is the git-HTTP clone path in routers/web/repo/githttp.go, which resolves permissions via this function and passes the result to p.CanAccess(Read, code). Notably, ComputeTaskTokenPermissions in models/actions/token_permissions.go only clamps the token ceiling to read-only for fork/cross-repo scenarios; its own code comments acknowledge the access decision belongs to GetActionsUserRepoPermission, so it does not neutralize the gap. The root cause is CWE-280 (Improper Handling of Insufficient Permissions or Privileges) - specifically an inconsistently applied security discriminator across sibling authorization branches. The affected package is gitea.dev (Go module, CPE: pkg:go/gitea.dev), versions less than 1.27.0.

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 7.1 HIGH
AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N
vuln.today AI 6.3 MEDIUM

Network vector via git-HTTP, high complexity for three-condition prerequisite, PR:L for authenticated contributor; scope changes to repo B; integrity set to None per the description's explicit read-only characterization, diverging from the vendor's I:L.

3.1 AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N
4.0 AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
SUSE MEDIUM
Red Hat 6.5 MEDIUM

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

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

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

Lifecycle Timeline

3
Analysis Updated
Aug 13, 2026 - 19:30 vuln.today
v2 - CVSS changed
Severity Changed
Aug 13, 2026 - 19:22 NVD
MEDIUM HIGH
CVSS changed
Aug 13, 2026 - 19:22 NVD
6.3 (MEDIUM) 7.1 (HIGH)

DescriptionCVE.org

Summary

GetActionsUserRepoPermission (models/perm/access/repo_permission.go) decides whether an Actions task token may access a target repo. Its cross-repo branches each enforce a fork-PR discriminator - except the collaborative-owner branch, which is missing the !task.IsForkPullRequest guard that its sibling has. As a result, when a private repo B lists owner A as a collaborative owner, an attacker-controlled fork pull-request workflow whose base repo is owned by A is granted code-read on B - i.e. the fork's YAML can clone a third private repository it has no rights to.

Details

go
// models/perm/access/repo_permission.go (v1.26.2), in GetActionsUserRepoPermission
if checkSameOwnerCrossRepoAccess(ctx, taskRepo, repo, task.IsForkPullRequest) { // passes isForkPR -> denies forks
    return maxPerm, nil
}
...
if taskRepo.IsPrivate {                                   // <-- NO IsForkPullRequest check here
    actionsUnit := repo.MustGetUnit(ctx, unit.TypeActions)
    if actionsUnit.ActionsConfig().IsCollaborativeOwner(taskRepo.OwnerID) {
        return maxPerm, nil                              // grants code-read to target repo B
    }
}

The sibling same-owner path correctly denies fork PRs:

go
func checkSameOwnerCrossRepoAccess(ctx, taskRepo, targetRepo, isForkPR bool) bool {
    if isForkPR {
        return false // Fork PRs are never allowed cross-repo access to other private repositories.
    }
    ...
}

taskRepo = the repo whose workflow is running (the PR's base repo A); repo = the target being cloned (B). IsCollaborativeOwner(taskRepo.OwnerID) asks "does target B's Actions config trust A's owner for cross-repo read?" When B trusts ownerA, the branch returns maxPerm (code-read) even when task.IsForkPullRequest is true - i.e. when the executing YAML is the fork's, not A's.

Every sibling enforces the fork-PR discriminator; except for this branch: checkSameOwnerCrossRepoAccess denies forks; ComputeTaskTokenPermissions (models/actions/token_permissions.go) only clamps the token *ceiling* to read-only for fork/cross-repo (its own comment notes the access *decision* is in GetActionsUserRepoPermission, so it does not neutralize the gap - it just makes the leak read-only); secrets (models/secret/secret.go) and the approval gate (services/actions/notifier_helper.go) both correctly key on IsForkPullRequest.

Reachability - the runner clones target repo B over git-HTTP with the task token: routers/web/repo/githttp.go → GetDoerRepoPermission(ctx, repoB, ActionsUser) → GetActionsUserRepoPermission(ctx, repoB, actionsUser, taskID) with IsForkPullRequest == true → collaborative-owner branch returns code-read → p.CanAccess(Read, code) passes → private clone of B succeeds. (CheckRepoScopedToken in githttp is a no-op for the Actions token.)

PoC

Setup: private base repo A (usera/repoA), private third repo B (userb/repoB) with a planted SECRET.txt, B's Actions config trusting usera as a collaborative owner, and a genuine running fork-PR task token (token_hash computed with Gitea's own HashToken) presented as HTTP Basic. Requesting GET /userb/repoB.git/info/refs?service=git-upload-pack:

Condition (same fork-PR token)HTTPMeaning
anonymous (no token)401auth required
token, A public, B trusts A404branch gated on taskRepo.IsPrivate ⇒ A public skips it
token, A private, B has no collab-owner config404no trust ⇒ denied
token, A private, B trusts A (collab-owner)200git clone of private B succeeds
config removed / restored404 / 200deterministic

In the 200 case, git clone of private repo B succeeded and yielded its SECRET.txt - the full source of a third private repo the fork-PR author has no rights to.

Impact

Read-only confidentiality breach: discloses the full source of a *third* private repository (B) to an untrusted external fork-PR author. Read-only, not write/RCE.

Preconditions (honest):

  1. B is deliberately configured with a collaborative owner - but that is exactly the feature's intended

use, so realistic for any deployment using it.

  1. The fork PR's base repo A is itself private (the branch is gated on taskRepo.IsPrivate). Forking a

private A already requires read on A, so this is a normal internal-contributor situation, not a weakening - the escalation is "read A (granted) → read a *different* private repo B (never granted)."

  1. The fork-PR workflow must actually run - most realistically via an attacker who had one earlier PR

approved (the "approved before" path in ifNeedApproval), after which fork PRs auto-run.

Suggested remediation

Add the same fork-PR guard the sibling path has (one line):

go
if taskRepo.IsPrivate && !task.IsForkPullRequest {
    actionsUnit := repo.MustGetUnit(ctx, unit.TypeActions)
    if actionsUnit.ActionsConfig().IsCollaborativeOwner(taskRepo.OwnerID) {
        return maxPerm, nil
    }
}

This flips Vuln_ForkPR_LeaksThirdPrivateRepo to PASS, keeps Control_NonFork_Allowed PASS (legitimate collaborative-owner sharing still works), and leaves the existing TestGetActionsUserRepoPermission suite all green.

Executive ViewAI

Why It Matters

Gitea versions through 1.26.4 with collaborative-owner Actions enabled allow attackers to read private source code repositories without authorization if they have previously submitted approved pull requests. This creates intellectual property exposure and confidentiality risk for organizations running affected versions. A vendor patch is available and should be deployed urgently.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 83% exploitable
Prevalence
Medium
self-hosted Git platform used by developer teams and organizations
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 HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
High

Priority Score

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

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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