/

CVE-2026-58438

Severity:

HIGH RISK

(7.5)

Cross-Repository IDOR (CWE-862) in Issue Dependency Removal

CVE-2026-58438

Deferred

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Unauthorized modification and disclosure of private repository activity

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A cross-repository insecure direct object reference (IDOR) in issue-dependency removal allows an attacker to reference issues in private repositories they are not authorized to access. Under conditions where authorization is checked against the supplied object or repository identifier incompletely, the attacker may tamper with dependency relationships and add comments to private repositories.

Affected context

This vulnerability occurs in issue-tracking functionality that removes dependencies between issues across repositories. It becomes risky when an endpoint accepts issue or repository identifiers from the client but does not consistently verify that the requesting user has permission to access and modify every referenced private repository.

Exploit preconditions

  • Attack surface: Issue-dependency removal and related issue-comment functionality
  • Required access: An authenticated account or session able to reach the affected application endpoint, depending on deployment controls
  • Trigger point: A request that references an issue or repository outside the attacker's authorized scope
  • Why exploitation is possible: Server-side authorization does not adequately bind the requested objects to the caller's permissions across repository boundaries

Why this happens

The underlying bug is a missing authorization check, mapped to CWE-862: Missing Authorization. The application processes client-controlled issue or repository identifiers and performs dependency or comment operations without enforcing an object-level permission check for each referenced resource. This creates an IDOR condition in which knowledge of, or the ability to supply, another repository's identifier can bypass the intended access boundary.

Potential impact

  • An attacker may alter issue-dependency relationships in private repositories.
  • An attacker may add unauthorized comments to private repository issues.
  • Repository owners may lose confidence in dependency and issue-history integrity.
  • The flaw could enable limited disclosure of private repository metadata or activity.
  • The vulnerability may support reconnaissance or follow-on attacks against project workflows.

General mitigation guidance

Mitigation generally focuses on enforcing object-level authorization at every operation and reducing trust in client-supplied identifiers.

Common defensive patterns include:

  • Authorizing the caller separately for each source issue, target issue, and repository involved.
  • Resolving objects within an access-controlled repository context rather than accepting unrestricted cross-repository references.
  • Applying the same authorization policy to dependency removal, comment creation, and related mutation paths.
  • Returning minimal, non-revealing responses when a referenced object is inaccessible.
  • Using least-privilege service identities and separating read, comment, and mutation permissions.
  • Adding regression tests for cross-tenant and cross-repository access boundaries.

How teams detect issues like this

Organizations can identify similar issues through:

  • Static analysis and code review searches for mutation endpoints that use client-provided object or repository IDs without nearby authorization checks.
  • Review of authorization middleware and policy calls to confirm they cover every object referenced by a request.
  • Dynamic tests that submit valid identifiers from unrelated private repositories using accounts with limited access.
  • Audit-log analysis for dependency changes or comments performed across repository boundaries.
  • Policy enforcement requiring object-level authorization tests for all repository mutation APIs.

Automated security review tools may help flag direct object references, but business-logic authorization should also be validated with targeted tests.

Sources

SourceLink
blog.gitea.comblog.gitea.com/gitea-1.27.0-is-released/
github.comgithub.com/go-gitea/gitea/releases/tag/v1.27.0
github.comgithub.com/go-gitea/gitea/security/advisories/GHSA-xv9x-fj9g-vj6h

Frequently asked

questions

It may be remotely exploitable through the affected issue-management endpoint when that endpoint is reachable by an attacker and accepts cross-repository object references.

The attacker generally needs an account or session that can access the relevant functionality. They do not necessarily need permission to the private repository being targeted.

Perform server-side, object-level authorization for every repository and issue involved in each dependency or comment operation, rather than trusting identifiers supplied by the client.

Use centralized authorization policies, test cross-repository and cross-tenant boundaries, minimize error details, and monitor audit logs for unexpected mutations.

Find out what's already
exploitable in your codebase.