/

CVE-2026-58433

Severity:

CRITICAL RISK

(9.1)

Missing Authorization (CWE-862) in Team-Repository Link

CVE-2026-58433

Deferred

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Unauthorized Modification of Repository Access Controls

Severity:

CRITICAL RISK

(9.1)

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 missing authorization check in a team-to-repository linking endpoint may allow a user to change repository team access without honoring the organization's RepoAdminChangeTeamAccess setting. This can let an otherwise unauthorized user alter repository permissions when the endpoint is reachable and the organization-level control is intended to restrict that operation.

Affected context

The issue occurs in organizations that use the team-repository linking endpoint and rely on the RepoAdminChangeTeamAccess organization setting to restrict changes to team access. The risk is present when endpoint authorization does not consistently evaluate that setting before processing a linking or access-change request.

Exploit preconditions

  • Attack surface: Team-to-repository linking or access-management API endpoint
  • Required access: An authenticated account able to reach the endpoint, with whatever baseline permissions the application normally requires
  • Trigger point: A request that links a team to a repository or changes team repository access
  • Why exploitation is possible: The endpoint may perform the requested operation without enforcing the organization-level authorization setting that is intended to prohibit it

Why this happens

The underlying flaw is an authorization enforcement gap. A security-relevant organization policy is not applied consistently at the endpoint that changes team-repository relationships, allowing the operation to proceed based on insufficient or incomplete permission checks. This maps to CWE-862: Missing Authorization, where access control is absent or bypassed for a protected action.

Potential impact

  • An unauthorized user may modify team access to repositories
  • Repository confidentiality or integrity could be reduced
  • Sensitive source code or project data may become accessible to unintended teams
  • Unauthorized changes could support further privilege abuse within the organization

General mitigation guidance

Mitigation generally focuses on enforcing authorization centrally and consistently for every team-repository access change.

Common defensive patterns include:

  • Evaluate organization-level access-control settings at the authorization boundary
  • Apply deny-by-default checks before processing linking or permission changes
  • Use centralized policy enforcement rather than endpoint-specific permission assumptions
  • Require the least privilege necessary for team and repository administration
  • Record auditable events for access-control changes and policy denials
  • Treat client-provided roles, identifiers, and policy decisions as untrusted until validated server-side

How teams detect issues like this

Organizations can assess for this class of issue through:

  • Static analysis and code review searches for access-changing endpoints lacking centralized authorization checks
  • Review of all code paths that create, remove, or modify team-repository relationships
  • Authorization tests covering denied organization settings and lower-privileged authenticated users
  • API policy tests confirming that organization-level restrictions are enforced server-side
  • Monitoring for repository team-access changes that conflict with organization policy
  • Automated security review tools that identify inconsistent authorization checks across equivalent endpoints

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-m6qc-j894-7h9r

Frequently asked

questions

It may be exploitable through the affected API endpoint when the endpoint is exposed to authenticated users and the authorization setting is not enforced.

An attacker generally needs an authenticated account with enough baseline access to invoke the team-repository linking operation. The exact required permissions depend on deployment and endpoint controls.

Enforce the organization setting and the user's effective permissions server-side before performing any team-repository access change, using a centralized authorization policy.

Maintain deny-by-default authorization, test negative permission cases for every access-changing endpoint, and monitor audit events for policy-violating repository access changes.

Find out what's already
exploitable in your codebase.