
PEACH
Un cadre d’isolation des locataires
CVE-2026-20706 is a token scope bypass vulnerability in Gitea affecting the web archive download endpoint (/archive/*). It allows a personal access token with any non-repository scope (e.g., read:issue or read:misc) to download full repository archives (zip/tar.gz) of private repositories the token owner has access to. All Gitea versions up to and including 1.26.1 are affected; the issue is patched in version 1.26.2. It carries a CVSS v4.0 base score of 5.3 (Medium) (GitHub Advisory).
The root cause is an incomplete authorization check (CWE-863: Incorrect Authorization) introduced when PR #37698 added checkDownloadTokenScope to the /raw/*, /media/*, and attachment download endpoints but omitted the /archive/* endpoint. The Download function in routers/web/repo/repo.go:372 accepts OAuth2 tokens via webAuth.AllowOAuth2 middleware but never calls checkDownloadTokenScope or CheckRepoScopedToken, meaning token scope is not validated for this route. By contrast, the equivalent API endpoint (/api/v1/repos/{owner}/{repo}/archive/*) correctly enforces scope via tokenRequiresScopes(AccessTokenScopeCategoryRepository), and git HTTP endpoints enforce scope via CheckRepoScopedToken in httpBase. The suggested fix is to add checkDownloadTokenScope(ctx) to both Download and InitiateDownload functions in routers/web/repo/repo.go (GitHub Advisory, Gitea Advisory).
Successful exploitation results in unauthorized disclosure of full private repository contents — including all source code, configuration files, and potentially embedded secrets — to any token holder whose token carries a non-repository scope. Because the /archive/* endpoint serves the entire repository as a zip or tar.gz archive, the confidentiality impact is broader than the previously patched individual file download endpoints. There is no integrity or availability impact, but exposed source code could facilitate further attacks such as credential harvesting or supply chain compromise (GitHub Advisory).
read:misc or read:issue, for an account that has read access to the target private repository.GET /{owner}/{private-repo}/archive/main.tar.gz
Authorization: token <your_non-repo-scoped_token>/raw/* (GitHub Advisory)./{owner}/{repo}/archive/*.tar.gz or /{owner}/{repo}/archive/*.zip authenticated with tokens that have non-repository scopes (e.g., read:misc, read:issue)./archive/* endpoints from tokens not expected to have repository read access; cross-reference token scope against the download activity.Upgrade Gitea to version 1.26.2 or later, which adds checkDownloadTokenScope(ctx) to the Download and InitiateDownload functions in routers/web/repo/repo.go, closing the scope bypass. No configuration-based workaround is available for unpatched versions; restricting network access to the Gitea instance can reduce exposure but does not eliminate the risk for authenticated users. Organizations should also audit existing personal access tokens and revoke any with broader-than-necessary scopes (GitHub Advisory, Gitea Release).
The vulnerability was discovered via variant analysis of PR #37698 by researcher geoo115 and responsibly disclosed to the Gitea maintainers. The advisory was published by Gitea maintainer lunny on June 5, 2026, and added to the GitHub Advisory Database on June 16, 2026. No significant broader media coverage or notable community commentary beyond the official advisory has been identified (GitHub Advisory).
Source: Ce rapport a été généré à l’aide de l’IA
Évaluation gratuite des vulnérabilités
Évaluez vos pratiques de sécurité cloud dans 9 domaines de sécurité pour évaluer votre niveau de risque et identifier les failles dans vos défenses.
Obtenez une démo personnalisée
"La meilleure expérience utilisateur que j’ai jamais vue, offre une visibilité totale sur les workloads cloud."
"Wiz fournit une interface unique pour voir ce qui se passe dans nos environnements cloud."
"Nous savons que si Wiz identifie quelque chose comme critique, c’est qu’il l’est réellement."