CVE-2026-70406: Gitea private comparison disclosure with public-only tokens
Gitea's shared comparison helper omits the token repository-access check used when updating pull requests. A public-only token with read:repository scope can route a comparison or pull request creation through a public base repository and retrieve commit history and diffs from a private head repository accessible to the token owner. This bypasses the token's public-only restriction; it does not remove the account's underlying repository permission checks.
Affected Software
Event History
Frequently Asked Questions
Who is exposed to this disclosure?
Gitea deployments are exposed where a token is restricted to public repositories but its owner still has permission to access a private repository. The issue does not grant access beyond the repository permissions already held by the token owner.
What does an attacker need to exploit it?
The attacker needs a public-only token with read:repository scope and an account that can access the private head repository. They must route a comparison or pull request creation through a public base repository.
What information can be disclosed?
The affected flow can reveal commit history and diffs from the private head repository. The disclosure is limited by the token owner's existing repository access.
How can teams reduce exposure before applying an update?
Do not use public-only read:repository tokens for accounts that also have access to private repositories, especially where those tokens can create pull requests or request comparisons using public base repositories. Restrict or revoke such tokens until the affected deployment is updated.