CVE-2026-118395
Deferred Deferred - Pending Action

Gitea Public-Only Token Privilege Escalation

Vulnerability report for CVE-2026-118395, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-01

Last updated on: 2026-11-01

Assigner: Gitea Limited

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-01
Last Modified
2026-11-01
Generated
2026-11-01
AI Q&A
2026-11-01
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
Gitea Gitea 0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-118395 is a vulnerability in Gitea versions up to 28.2.0 where a deprecated API endpoint allows public-only access tokens to create private repositories despite restricted permissions. The issue occurs because the endpoint lacks a guard that rejects public-only tokens, enabling scope bypass. An attacker with a public-only token (with write:repository and write:organization scopes) can create private repositories in organizations where they have CanCreateOrgRepo permissions.

The vulnerability does not allow reading private data, as the token remains restricted for read operations.

Detection Guidance

Check Gitea logs for unauthorized repository creation attempts via deprecated endpoints like POST /org/{org}/repos or POST /orgs/{org}/repos. Monitor for tokens with write:repository and write:organization scopes creating private repositories in organizations where the token holder has CanCreateOrgRepo permissions.

Impact Analysis

An attacker with a public-only token could create private repositories in organizations where the token owner has permissions, potentially occupying namespaces or consuming quota. This could lead to unauthorized resource usage or conflicts in repository naming.

Mitigation Strategies

Upgrade Gitea to a version that includes the rejectPublicOnly() guard in all affected endpoints. Review and revoke any public-only tokens with write scopes. Restrict organization creation permissions and enforce stricter token policies.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-118395. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...