Skip to main content

Gitea EUVDEUVD-2026-58165

| CVE-2026-58438 HIGH
Missing Authorization (CWE-862)
2026-07-21 https://github.com/go-gitea/gitea GHSA-xv9x-fj9g-vj6h
7.5
CVSS 3.1 · Vendor: https://github.com/go-gitea/gitea
Share

Severity by source

Vendor (https://github.com/go-gitea/gitea) PRIMARY
7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
vuln.today AI
5.0 MEDIUM

Exploitation requires authenticated issue-write access (PR:L); scope changes (S:C) because the integrity impact crosses into a distinct private repository the attacker cannot read.

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

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
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Lifecycle Timeline

5
Analysis Updated
Aug 14, 2026 - 20:36 vuln.today
v2 (cvss_changed)
Re-analysis Queued
Aug 14, 2026 - 20:22 vuln.today
cvss_changed
CVSS changed
Aug 14, 2026 - 20:22 NVD
7.5 (HIGH)
Source Code Evidence Fetched
Jul 21, 2026 - 21:15 vuln.today
Analysis Generated
Jul 21, 2026 - 21:15 vuln.today

DescriptionCVE.org

Details

RemoveDependency in routers/web/repo/issue_dependency.go takes a removeDependencyID form parameter identifying the other issue by its global numeric ID, and fetches it with issues_model.GetIssueByID(ctx, depID) - no repository or permission check at all. It then calls issues_model.RemoveIssueDependency(ctx, ctx.Doer, issue, dep, depType) (models/issues/dependency.go), which deletes the dependency join row and then writes a comment referencing the removal, attributed to the calling user, onto the dependency record.

The sibling function in the very same file, AddDependency, does this correctly when the two issues are in different repos (which ALLOW_CROSS_REPOSITORY_DEPENDENCIES, on by default, permits):

go
if issue.RepoID != dep.RepoID {
  if !setting.Service.AllowCrossRepositoryDependencies { ... }
  depRepoPerm, err := access_model.GetDoerRepoPermission(ctx, dep.Repo, ctx.Doer)
  if !depRepoPerm.CanReadIssuesOrPulls(dep.IsPull) {
    return // you can't see this dependency
  }
}

RemoveDependency has no equivalent block at all - it goes straight from resolving dep by ID to deleting the link, regardless of which repo dep lives in or whether the caller can see it. I confirmed this same code is present in the current latest release, v1.26.4.

PoC

Prerequisites: an account with write access to issues on some repo ownerA/repoA, and the global numeric issue ID of an issue in a private repo repoB that is (or was) legitimately dependency-linked to one of the attacker's issues in repoA (cross-repo dependencies are commonly used between related public/private repos, and ALLOW_CROSS_REPOSITORY_DEPENDENCIES defaults to enabled).

bash
curl -s -b "gitea_session=$ATTACKER_SESSION_COOKIE" -X POST \
  --data-urlencode "removeDependencyID=<repoB_issue_global_id>" \
  --data-urlencode "dependencyType=blockedBy" \
  "https://TARGET_HOST/ownerA/repoA/issues/N/dependency/delete"
# Expected: the dependency link is deleted and a "removed dependency" comment
# authored by the attacker is added to the repoB issue, even though the
# attacker has no read access to repoB.

Impact

This is a cross-repository IDOR / broken access control issue. An attacker can tamper with issue-tracking state (dependency relationships) and inject an attacker-authored comment into a private repository they cannot otherwise read or write to, crossing a trust boundary the "add" path explicitly enforces. Impact is bounded - it requires an existing dependency link and discloses no repository content - but it is a genuine unauthorized-write primitive across a private-repo boundary.

Fix

Add the same cross-repo permission check used in AddDependency (access_model.GetDoerRepoPermission(ctx, dep.Repo, ctx.Doer).CanReadIssuesOrPulls(dep.IsPull)) to RemoveDependency before allowing the deletion to proceed when issue.RepoID != dep.RepoID.

If possible, please apply for a CVE number when publishing. I would greatly appreciate it.

AnalysisAI

Broken access control in Gitea's issue-dependency removal endpoint allows any authenticated user with issue-write access on one repository to delete cross-repository dependency links and inject attacker-authored comments into private repositories they have no read or write access to. All Gitea releases through v1.26.4 are affected; the sibling AddDependency function in the same source file performs the correct cross-repository permission check that RemoveDependency entirely omits. A working proof-of-concept curl command is published in the GitHub Security Advisory GHSA-xv9x-fj9g-vj6h, though no confirmed active exploitation (CISA KEV) has been identified and EPSS sits at 0.15% (4th percentile).

Technical ContextAI

The vulnerability resides in routers/web/repo/issue_dependency.go within Gitea's Go codebase (package gitea.dev/gitea). The root cause is CWE-862 (Missing Authorization): an asymmetric implementation between AddDependency and RemoveDependency. AddDependency correctly guards cross-repository operations by calling access_model.GetDoerRepoPermission and verifying CanReadIssuesOrPulls before allowing the operation to proceed across repository boundaries. RemoveDependency instead fetches the target issue by its raw global numeric ID via issues_model.GetIssueByID - with no repository or permission check - and immediately invokes issues_model.RemoveIssueDependency, which both deletes the dependency join row and writes a comment attributed to the calling user onto the dependency issue's timeline. The ALLOW_CROSS_REPOSITORY_DEPENDENCIES setting, enabled by default, is a prerequisite for cross-repository linking and creates the exploitable code path. The affected package spans all versions prior to 1.27.0 as confirmed by CPE pkg:go/gitea.dev and the ENISA EUVD entry EUVD-2026-58165.

RemediationAI

Upgrade Gitea to v1.27.0 or later, which introduces the missing cross-repository permission check in RemoveDependency consistent with the guard already present in AddDependency; release binaries are available at https://github.com/go-gitea/gitea/releases/tag/v1.27.0 and release notes at https://blog.gitea.com/gitea-1.27.0-is-released/. If an immediate upgrade is not feasible, setting ALLOW_CROSS_REPOSITORY_DEPENDENCIES = false in app.ini eliminates the cross-repository attack path by preventing the feature entirely, though this also disables all legitimate cross-repo dependency creation - operators should evaluate the operational trade-off. As a secondary compensating control, restricting network access to the /dependency/delete endpoint to trusted internal networks reduces exposure from external or guest accounts but does not address insider threats from authenticated users with issue-write access. The full advisory is at https://github.com/go-gitea/gitea/security/advisories/GHSA-xv9x-fj9g-vj6h.

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected

Share

EUVD-2026-58165 vulnerability details – vuln.today

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