{"id":"CVE-2026-118395","kind":"vulnerability","aliases":["CVE-2026-118395"],"related":[],"title":"Gitea: public-only tokens could still create private repositories and organizations","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.","summary":"Gitea 1.27.3 blocked tokens restricted to public resources from creating repositories on some API routes, but several other routes still accepted them. A holder of such a token with write scopes could create private repositories, private organizations and repositories generated from templates, though it still could not read those private repositories.","severity":"medium","cvss":null,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["gitea","package","personal-access-tokens","self-hosted"],"not_affected_if":["managed-hosting","no-public-only-tokens"],"how_to_check":"- Check the Gitea version with `gitea --version` or the admin dashboard and compare it against the fixed release.\n- Look for personal access tokens scoped to `public-only` in user settings or the admin token list, and check whether any holder has write scopes.\n- Review audit or API logs for calls to `POST /api/v1/org/{org}/repos`, `POST /api/v1/orgs/{org}/repos`, `POST /api/v1/orgs` or `POST /api/v1/repos/{owner}/{repo}/generate` made with a public-only token.","fix":null,"status":"open","published_at":"2026-11-01T10:18:36+00:00","first_seen_at":"2026-11-01T10:49:33+00:00","triaged_at":"2026-11-01T10:51:27+00:00","updated_at":"2026-11-01T10:51:27+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-11-01T10:51:27Z","model":"claude-haiku-5-5","output":{"fix":"unknown","reach":"network","title":"Gitea: public-only tokens could still create private repositories and organizations","impact":"low","summary":"Gitea 1.27.3 blocked tokens restricted to public resources from creating repositories on some API routes, but several other routes still accepted them. A holder of such a token with write scopes could create private repositories, private organizations and repositories generated from templates, though it still could not read those private repositories.","audience":"businesses","category":"package","nicknames":[],"who_cares":["gitea","self-hosted","personal-access-tokens"],"confidence":0.7,"fix_status":"unknown","needs_auth":"yes","worst_case":"Token holder creates private repositories and organizations it cannot read back","analyst_note":"Confirm the fixed version after 1.27.3 and whether the NVD entry lists a patch; the sources give no fix version.","how_to_check":"- Check the Gitea version with `gitea --version` or the admin dashboard and compare it against the fixed release.\n- Look for personal access tokens scoped to `public-only` in user settings or the admin token list, and check whether any holder has write scopes.\n- Review audit or API logs for calls to `POST /api/v1/org/{org}/repos`, `POST /api/v1/orgs/{org}/repos`, `POST /api/v1/orgs` or `POST /api/v1/repos/{owner}/{repo}/generate` made with a public-only token.","plain_action":"","needs_analyst":true,"not_affected_if":["no-public-only-tokens","managed-hosting"],"who_is_affected":"Teams that run a self-hosted Gitea instance and issue personal access tokens restricted to public resources with write scopes. The flaw lets such a token create private content on routes the 1.27.3 fix missed, so instances without public-only tokens are unlikely to be exposed. Hosted Gitea users are affected only if their provider runs a vulnerable version.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"medium"},"cost_usd":0.000772,"input_tokens":4250,"output_tokens":693,"severity_before":"unknown"},"analyst_status":null,"analyst_note":null,"search":"'-118395':15A,18A '-2026':14A,17A '/api/v1/org':103C '/api/v1/orgs':107C,111C '/api/v1/repos':114C '/api/v1/repos/migrate':100C '/api/v1/user/repos':97C '/generate':117C '/repos':105C,109C '1.27.3':29B,80C 'accept':48B,119C 'access':23B,83C 'api':41B 'block':30B 'could':6A,59B,73B,135C,161C 'creat':8A,37B,60B,93C,136C,147C,149C,168C 'cve':13A,16A 'generat':67B,153C 'gitea':1A,19B,28B,79C 'holder':51B,123C 'host':27B 'may':146C 'need':132C 'org':104C,108C 'organ':12A,64B,140C,151C 'owner':115C,145C 'packag':20B 'person':22B,82C 'personal-access-token':21B 'post':96C,99C,102C,106C,110C,113C 'privat':9A,61B,63B,77B,137C,150C,154C,165C 'public':3A,34B,87C,90C,127C 'public-on':2A,89C,126C 'read':75B,163C 'repo':116C 'repositori':10A,38B,62B,66B,78B,94C,138C,148C,155C,166C 'resourc':35B,88C 'restrict':32B,85C 'rout':42B,46B 'scope':58B,134C 'self':26B 'self-host':25B 'sever':44B 'still':7A,47B,72B,118C,160C 'stop':81C 'templat':69B,157C 'though':70B 'token':5A,24B,31B,55B,84C,121C,129C,143C,159C 'write':57B,133C","nicknames":[],"mitigations":[],"who_affected":"Teams that run a self-hosted Gitea instance and issue personal access tokens restricted to public resources with write scopes. The flaw lets such a token create private content on routes the 1.27.3 fix missed, so instances without public-only tokens are unlikely to be exposed. Hosted Gitea users are affected only if their provider runs a vulnerable version.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"none","audience":"businesses","plain_action":null,"first_public_at":"2026-11-01T10:18:36+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-118395","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-118395","severity":null,"published_at":"2026-11-01T10:18:36+00:00","modified_at":"2026-11-01T10:18:36+00:00","first_seen_at":"2026-11-01T10:49:33+00:00","fetched_at":"2026-11-01T10:49:33+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}