CVE-2026-70400 in Giteainfo

Summary

by MITRE • 10/14/2026

Gitea's repository migration API accepts a public-only token when the request specifies creation of a private repository. A delegated token intended to operate only on public resources can create a private repository and migration task under the authorizing account or an organization where that user has the necessary permissions. The ordinary private repository-creation route rejects the same token, but the migration path omits that restriction.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 10/14/2026

The vulnerability identified in Gitea represents a critical authorization bypass within its repository migration functionality, specifically affecting how access tokens are validated during the creation of repositories via the API. This flaw allows an attacker possessing only a public-scoped token to perform actions reserved for users with elevated privileges or private resource permissions. In standard software security principles, particularly those outlined in CWE-269 regarding Improper Privilege Management, systems must strictly enforce that user roles and associated tokens align with the sensitivity of the requested operation. Gitea’s ordinary repository creation endpoint correctly rejects public-only tokens when attempting to create a private repository, demonstrating that the underlying permission logic is partially implemented but inconsistently applied across different API endpoints.

The technical root cause lies in the migration API path failing to inherit or enforce the same token scope restrictions as the standard repository creation route. When a request specifies the creation of a private repository through the migration endpoint, the system does not adequately verify that the provided delegated token possesses the necessary permissions for private resources. This inconsistency creates an authorization gap where a token explicitly limited to public data can trigger backend processes that result in the instantiation of private repositories and associated migration tasks under the authorizing account or within organizations where the user holds administrative rights. The operational impact is significant, as it allows unauthorized escalation of privileges without requiring valid credentials for restricted resources, potentially leading to data leakage if sensitive codebases are migrated into these newly created private spaces.

From a threat modeling perspective using MITRE ATT&CK frameworks, this vulnerability aligns with techniques related to Privilege Escalation and Defense Evasion, specifically involving the abuse of API endpoints that lack consistent validation logic. Attackers can exploit this by crafting specific HTTP requests to the migration endpoint, leveraging public tokens obtained from less secure sources or leaked configurations to establish private repositories. This capability undermines the integrity of access control policies designed to segregate sensitive intellectual property and confidential project data. The existence of such a bypass means that organizations relying on Gitea for version control cannot assume that token scopes are uniformly enforced across all administrative functions, thereby increasing the risk profile associated with API-based interactions.

To mitigate this vulnerability, immediate remediation should focus on ensuring consistent authorization checks across all repository-related endpoints. Developers must audit the migration API implementation to verify that it applies the same strict validation rules as the standard private repository creation route, specifically checking for sufficient token scopes before allowing the operation to proceed. Additionally, implementing comprehensive logging and monitoring for unusual patterns of repository creation via migration tools can help detect potential exploitation attempts in real-time. Long-term fixes should involve adopting a centralized authorization middleware or service that enforces permission checks uniformly across all API paths, thereby eliminating discrepancies between different functional modules within the application architecture.

Responsible

Gitea

Reservation

08/13/2026

Disclosure

10/14/2026

Moderation

accepted

EPSS

0.00000

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!