Skip to main content
VulnerabilityPublished

CVE-2026-58431: Gitea · Public-only API token restriction is not enforced on team API routes

Affects gitea.devSource GCVE Database

0
Authoritative record:CVE-2026-58431· Medium 4.3

Not known to be exploited · CVSS 4.3 Medium : upgrade to 1.27.0 when convenient.

Data as of 26 Oct 2026, 10:12 UTC

CVSS 3.1 base score
4.3Medium
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.3% chance of exploitation in 30 days – higher than 26% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 1.27.0
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N

Exploitation evidence

t = 0 is the CVE’s publication on cve.org

  1. Disclosed: evidence found.

    CVE published 13 Aug 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: evidence found.

    CISA SSVC: proof of concept public

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

Timeline

  1. CVE ID reserved

    by Gitea Limited

    , 44 days before disclosure

  2. CVE published

    on cve.org

    , t = 0

  3. CISA SSVC assessment

    proof of concept public

    , 25 hours after disclosure

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), CISA SSVC, the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.

What to do

Upgrade gitea.dev to 1.27.0.

Affected software

ProductAffectedFixed in
Gogitea.devAffected
  • <1.27.0
Fixed in
  • 1.27.0

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

Description

### Summary Gitea's `/api/v1/teams/{id}` API routes do not correctly enforce the `public-only` access token restriction. A `public-only` token is intended to limit API access to public repositories and public organizations. However, several team API routes continue to return private team repository metadata and private team activity feed entries when called with a `public-only` token. ### Details The `/api/v1/teams/{teamid}` route group uses: ```go orgAssignment(false, true) ``` This loads `ctx.Org.Team`, but does not load `ctx.Org.Organization`. The `checkTokenPublicOnly` middleware checks organization visibility through `ctx.Org.Organization`. When `ctx.Org.Organization` is nil, the organization visibility check silently passes. In addition, the team repository handlers return repositories without applying repository-level `public-only` filtering: ```go repo_model.GetTeamRepositories(...) convert.ToRepo(...) ``` They do not call: ```go ctx.TokenCanAccessRepo(repo) ``` The team activity feed handler also sets: ```go IncludePrivate: true ``` but does not apply: ```go opts.ApplyPublicOnly(ctx.PublicOnly) ``` ### PoC Vulnerability is verified on latest gitea release (1.26.2) and nightly build. Frist, create a `public-only` organization-scoped token for a user who is a member of a team in a private org with private repositories: <img width="1075" height="577" alt="image" src="https://github.com/user-attachments/assets/4a01d0ab-f67c-47c9-94b1-e74ddd77d7bc" /> <img width="649" height="375" alt="image" src="https://github.com/user-attachments/assets/b5d91962-088e-40f4-bc51-88a17946e6d8" /> Use the returned token to request team repositories: <img width="1728" height="190" alt="image" src="https://github.com/user-attachments/assets/0f15878f-5806-431d-958c-ffb39bf7c1e9" /> Expected result: Private repositories should be hidden or rejected for a public-only token. Actual result: Private team repository metadata is returned. The team activity feed endpoint can be tested similarly: <img width="1728" height="237" alt="image" src="https://github.com/user-attachments/assets/280a5ddf-ad14-4769-86a8-1fdad858287c" /> ### Impact A `public-only` token can access private team resources that should be hidden from that token.

References

Community reviews

Loading reviews…