Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-117635 — Proof-of-concept lab and Nuclei template for CVE-2026-117635, a Gitea public-only token scope bypass on the admin API that leaks private orgs and enables admin creation. | Kitploit
Tools/GitHubGitHub/omarkurt/cve-2026-117635
Authentication & AuthorizationWeb Vulnerability ScannersVulnerability AnalysisExploitationWeb SecurityAPI SecurityLabs & Practice
GitHubomarkurt/cve-2026-117635

CVE-2026-117635

Proof-of-concept lab and Nuclei template for CVE-2026-117635, a Gitea public-only token scope bypass on the admin API that leaks private orgs and enables admin creation.

View Repository
9 days agoNot yet reviewed
Share
 ██╗   ██╗ ████████╗    H A P P Y   H A C K I N G   S P A C E
 ██║   ██║ ╚══██╔══╝    ──────────────────────────────────────
 ╚██╗ ██╔╝    ██║       Vulnerable Target - CVE threat-intel
  ╚████╔╝     ██║       CVE-2026-117635  ▸  VT-2026-117635
   ╚═══╝      ╚═╝       https://vulnerabletarget.com

CVE-2026-117635 — Gitea Public-only Token Scope Bypass on the Admin API

Severity CVSS 3.1 CWE-284 Affected Fixed VT

CVECVE-2026-117635 · GHSA-37xv-m4w7-j2fh
CVSS v3.18.1 HIGH — CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
CWECWE-284 (Improper Access Control) · CWE-1259 (Improper Restriction of Security Token Assignment)
Affected / FixedGitea <= 28.2.0 → fixed in 28.3.0 (PR #39690, backport #39853)
VT pagevulnerabletarget.com/VT-2026-117635 · package: vt-2026-117635

TL;DR

Gitea access tokens can carry a public-only restriction meant to limit their reach to public resources only. Through Gitea 28.2.0 this restriction is enforced on the normal API route groups but not on the /api/v1/admin route group. A token created with public-only + write:admin from a site-admin account is correctly refused on GET /api/v1/orgs/{private-org} ("token scope is limited to public orgs") yet is accepted on GET /api/v1/admin/orgs, which returns private organizations. From there the same token can enumerate every user and email, create private orgs, mint Actions runner registration tokens, and create or promote a new site administrator — an account that survives revocation of the original token.

This is the same defect class already fixed for /api/v1/user (CVE-2026-24791, 1.26.2) and for org/team routes (CVE-2026-58429, 1.27.0); CVE-2026-117635 is the admin-API instance of it.

The bypass (why a "restricted" token becomes admin)

sequenceDiagram
    participant A as Attacker (holds a public-only + write:admin token issued by a site admin)
    participant N as /api/v1/orgs/{org}  (normal route group)
    participant AD as /api/v1/admin/*    (admin route group)

    A->>N: GET /api/v1/orgs/secretorg          (token: public-only)
    N-->>A: 403  {"message":"token scope is limited to public orgs"}   ✅ restriction enforced
    A->>AD: GET /api/v1/admin/orgs?limit=50     (same token)
    Note over AD: admin group attaches NEITHER checkTokenPublicOnly() NOR rejectPublicOnly()<br/>admin.GetAllOrgs hard-codes Visible {Public, Limited, Private}
    AD-->>A: 200  [{"name":"secretorg","visibility":"private", ...}]   ❌ restriction ignored
    A->>AD: GET /api/v1/admin/users              → all accounts + emails
    A->>AD: POST /api/v1/admin/users            → create account
    A->>AD: PATCH /api/v1/admin/users/{u} {"admin":true}  → promote to SITE ADMIN (persists after token revoke)
    A->>AD: mint Actions runner registration token

Root cause (advisory + PR #39690 confirmed)

  1. Scope flag is recorded, but the admin group never checks it. tokenRequiresScopes() (routers/api/v1/api.go) sets ctx.PublicOnly on the request. Two middlewares enforce it per route group — checkTokenPublicOnly() (narrows to the public subset; has no Admin case) and rejectPublicOnly() (refuses outright). Through v28.2.0 the admin group was declared as:

    // routers/api/v1/api.go  (v28.2.0)
    m.Group("/admin", func() { ... },
        tokenRequiresScopes(auth_model.AccessTokenScopeCategoryAdmin),
        reqToken(), reqSiteAdmin())   // <-- neither checkTokenPublicOnly() nor rejectPublicOnly()
    

    so a public-only token passes straight through.

  2. Handler returns private data unconditionally. admin.GetAllOrgs (routers/api/v1/admin/org.go) hard-codes the visibility set:

    Visible: []api.VisibleType{api.VisibleTypePublic, api.VisibleTypeLimited, api.VisibleTypePrivate}
    

    so the admin listing exposes private orgs regardless of the token restriction.

  3. The fix (v28.3.0). PR #39690 ("refactor: carry the API token on the doer") moves the token onto the doer so scope checks use it, and adds rejectPublicOnly() to the admin group (seven new call sites total). After the fix, public-only tokens receive 403/404 on admin routes.

Precondition: the token must be issued from a site-admin account. A non-admin token with write:admin still gets 403 from reqSiteAdmin(). The risk is that public-only tokens are explicitly "safe to share," so they are more likely to end up in CI variables, logs, or scripts.

Affected / Fixed

AffectedGitea <= 28.2.0
Fixed28.3.0 (released 2026-11-01; PR #39690, backport #39853)
Docker pre-fix (lab)gitea/gitea:28.2.0 → mirrored to ghcr.io/happyhackingspace/vt-2026-117635:28.2.0
Docker fixed (FP test)gitea/gitea:28.3.0

Gitea switched from the 1.27.x line to 28.x versioning in September 2026; some write-ups reference 1.27.1 (the reporter's test instance) but the released vulnerable/fixed tags are 28.2.0 / 28.3.0.

Sibling advisories (same public-only defect class)

CVE / GHSARoutesFixed in
CVE-2026-24791 (GHSA-wrr5-99h5-gq57)/api/v1/user1.26.2
CVE-2026-58429 (GHSA-fq2p-5p22-8g6j) + GHSA-h56g-4qw7-2mxgorg / team routes1.27.0
CVE-2026-117635 (GHSA-37xv-m4w7-j2fh)/api/v1/admin/*28.3.0

VT package & detection

Package: cves/vt-2026-117635 — standard 3-file layout (index.yaml, docker-compose.yaml, vt-2026-117635.nuclei.yaml).

Lab: docker compose up brings up the mirrored pre-fix image; an embedded seed step registers the first user (Gitea auto-promotes it to site admin → vtadmin / VtAdmin123!), creates a private org secretorg, mints a public-only, write:admin token, runs the differential, and writes /proof/flag.txt. Read it with docker compose logs seed or docker compose run --rm proof-reader.

Nuclei template — authenticated differential (2 requests, req-condition):

StepRequestExpected (vulnerable 28.2.0)
ControlGET /api/v1/orgs/{{org}} with Authorization: token {{token}}403 + "token scope is limited"
BypassGET /api/v1/admin/orgs?limit=50 with the same token200 + "visibility":"private"

Match fires only when both hold — it first proves the token really is public-only, then proves the admin route leaked a private org. On patched 28.3.0 the bypass request returns 403 → no match (no false positive).

# Requires a public-only write:admin token and a private org slug (authenticated by design):
nuclei -t vt-2026-117635.nuclei.yaml -u http://localhost:3000 -var token=<TOKEN> -var org=secretorg
Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    1.0k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    593
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    381
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    321
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    316
  • 6

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    305

Explore all tools

Browse our collection of tools

View all tools →