CVE-2026-118395 Gitea public-only token bypass in repository and organization creation
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: yes · technical impact: partial
Description
Gitea 1.27.3 stopped personal access tokens restricted to public resources (public-only) from creating repositories through POST /api/v1/user/repos and POST /api/v1/repos/migrate, but POST /api/v1/org/{org}/repos, POST /api/v1/orgs/{org}/repos, POST /api/v1/orgs and POST /api/v1/repos/{owner}/{repo}/generate still accepted such tokens. A holder of a public-only token with the needed write scopes could create private repositories in organizations where the token's owner may create repositories, create private organizations, and generate private repositories from templates. The token still could not read the private repositories it created.
Upgrade path
1 package: 1 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| Gitea | < 28.3.0 | 28.3.0 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| Gitea | < 28.3.0 | 28.3.0 |
References
- GitHub Security Advisory GHSA-x5v4-836g-f95x vendor-advisory
- Fix: go-gitea/gitea pull request #39690 patch
- Fix backport to release/v28: go-gitea/gitea pull request #39853 patch
- Gitea 28.3.0 release announcement release-notes
- go-gitea/gitea v28.3.0 release release-notes
- ENISA EUVD EUVD-2026-114803 third-party-advisory