/

CVE-2026-119441

Severity:

HIGH RISK

(7.5)

Authorization Bypass (CWE-863) in Organization Repo API

CVE-2026-119441

Deferred

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-863

Impact:

Unauthorized deletion of private repositories and data loss

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

The organization repository deletion endpoint did not enforce the public-only restriction on access tokens, checking only whether the organization was public. As a result, an owner using a public-only token could permanently delete private repositories in that organization.

Affected context

The issue occurs in the DELETE /api/v1/orgs/{org}/repos API route when authorization checks consider the organization's visibility but do not also enforce the token's access restrictions. It is risky when a public-only token belonging to an organization owner can reach the route while the organization contains private repositories.

Exploit preconditions

  • Attack surface: The organization repository deletion API
  • Required access: A valid public-only access token belonging to an owner of a public organization
  • Trigger point: A request to delete all repositories for that organization
  • Why exploitation is possible: The route checked that the organization was public but did not enforce the token's public-only restriction for private repositories

Why this happens

The route applied an incomplete authorization check: it verified an organization-level property without checking whether the token was permitted to act on each affected repository. This is an authorization enforcement failure mapped to CWE-863: Incorrect Authorization, because access controls did not correctly restrict an operation on private resources.

Potential impact

  • Private repositories may be permanently deleted without the token being authorized to reach them
  • Organizations could lose repository content, history, or related work
  • Recovery efforts may require backups and could disrupt development workflows

General mitigation guidance

Defensive patterns include evaluating authorization against every resource affected by a bulk operation, rather than relying only on organization-level visibility. Treat token scopes and resource visibility as separate constraints, deny access by default when either check fails, and limit deletion privileges to the minimum required. Where practical, use safeguards such as explicit confirmation and recoverable deletion mechanisms for destructive operations.

How teams detect issues like this

  • Review routes that perform bulk operations for checks against every affected resource
  • Use static analysis or code review to identify authorization decisions based only on parent-resource visibility
  • Add policy and integration tests covering restricted tokens, private resources, and destructive actions
  • Monitor audit logs for bulk deletion requests made with tokens that have limited scopes

Sources

SourceLink
blog.gitea.comblog.gitea.com/release-of-28.3.0/
github.comgithub.com/go-gitea/gitea/pull/39690
github.comgithub.com/go-gitea/gitea/pull/39853
github.comgithub.com/go-gitea/gitea/releases/tag/v28.3.0
github.comgithub.com/go-gitea/gitea/security/advisories/GHSA-jh8p-x4ch-389q

Frequently asked

questions

It concerns the organization-wide repository deletion API and can affect private repositories in a public organization when the token restriction is not enforced.

The described scenario requires a valid public-only token belonging to an owner of a public organization.

Check authorization for every resource affected by the operation, including both token permissions and resource visibility, and deny the request if any check fails.

Test authorization boundaries for bulk operations, enforce least privilege, and review policies to ensure that parent-resource checks do not substitute for access checks on individual resources.

Find out what's already
exploitable in your codebase.