CVE-2026-118395: Gitea public-only token scope bypass in repository creation

CVE-2026-118395 · Severity: info · Published 2026-11-01

Gitea is a self-hosted git service that organizations use to manage code repositories. A flaw in version 1.27.3 allowed personal access tokens marked as "public-only" to bypass restrictions and create private repositories and organizations, which should have been forbidden. An attacker with a public-only token could abuse this to create hidden repositories and organizations, though they could not read the private content they created.

Technologies: Gitea. Vendors: Gitea.

Quick answers

Is CVE-2026-118395 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-118395 being exploited in the wild.
How severe is CVE-2026-118395?
Informational severity, published 1 November 2026.
Which products and versions are affected?
Gitea 1.27.3.
Is there a fix for CVE-2026-118395?
Yes: fixed in Gitea 28.3.0. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-118395 attacked?
It is attacked over the network.
Am I affected by CVE-2026-118395?
Check whether you run Gitea at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • Fixed in: Gitea 28.3.0

Technical details

The vulnerability is an authorization bypass where public-only token scope restrictions were not consistently enforced across all API endpoints. Endpoints such as POST /api/v1/org/{org}/repos, POST /api/v1/orgs, and POST /api/v1/repos/{owner}/{repo}/generate failed to reject public-only tokens, allowing repository and organization creation operations that violated the token's scope. The issue was fixed by refactoring token scope checks to apply consistently across the API.

Affected products

  • Gitea Gitea 1.27.3

Timeline

  • 2026-11-01: disclosed
  • 2026-11-01: patched

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.