Gitea: Token public-only scope bypassed on Limited-visibility owners (Repository + Package categories) — residual after CVE-2026-25714 / PR #37118 (CVE-2026-56443)
Gitea versions prior to 1.27.0 contain a vulnerability where the 'public-only' personal access token (PAT) scope can be bypassed for repositories and packages owned by users with 'Limited' visibility. This occurs because the visibility checks for these categories incorrectly treat 'Limited' visibility as non-private, allowing tokens with 'public-only' scope to access content beyond intended anonymous reach. The issue was verified on version 1.26.2 despite previous fixes for related token scope enforcement. The vulnerability affects API endpoints for packages, repositories, and web download routes, enabling unauthorized read access to internal content.
AI Analysis
Technical Summary
After the unification of public-only token filtering in Gitea (PR #37118, CVE-2026-25714), a residual issue remains where 'public-only' PAT scope is bypassable on Repository and Package categories if the owner's visibility is set to 'Limited'. The visibility checks for these categories rely on 'repo.IsPrivate' or 'Owner.Visibility.IsPrivate()', which return false for 'Limited' visibility, unlike other categories that correctly reject non-public visibility using '!Visibility.IsPublic()'. This discrepancy allows a 'public-only' token to access repository and package content that should be restricted to internal users only. The vulnerability was confirmed on Gitea 1.26.2 with a proof-of-concept demonstrating unauthorized access to limited-visibility packages and repositories. Affected code paths include API v1 package endpoints, repository API endpoints, and web download endpoints, all of which fail to properly restrict access based on 'Limited' visibility.
Potential Impact
An attacker with a 'public-only' scoped personal access token can access repository and package content owned by users with 'Limited' visibility, which is intended to be internal-only. This results in unauthorized read access to potentially sensitive internal packages and repository data. The vulnerability does not allow write or modification actions, and the token scope enforcement correctly restricts other categories such as User and Organization. There are no known exploits in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, users should avoid using 'public-only' scoped tokens on repositories or packages owned by users with 'Limited' visibility or restrict the use of such tokens accordingly. Monitor official Gitea repositories and advisories for updates addressing this issue.
Gitea: Token public-only scope bypassed on Limited-visibility owners (Repository + Package categories) — residual after CVE-2026-25714 / PR #37118 (CVE-2026-56443)
Description
Gitea versions prior to 1.27.0 contain a vulnerability where the 'public-only' personal access token (PAT) scope can be bypassed for repositories and packages owned by users with 'Limited' visibility. This occurs because the visibility checks for these categories incorrectly treat 'Limited' visibility as non-private, allowing tokens with 'public-only' scope to access content beyond intended anonymous reach. The issue was verified on version 1.26.2 despite previous fixes for related token scope enforcement. The vulnerability affects API endpoints for packages, repositories, and web download routes, enabling unauthorized read access to internal content.
CVSS v3.1
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
After the unification of public-only token filtering in Gitea (PR #37118, CVE-2026-25714), a residual issue remains where 'public-only' PAT scope is bypassable on Repository and Package categories if the owner's visibility is set to 'Limited'. The visibility checks for these categories rely on 'repo.IsPrivate' or 'Owner.Visibility.IsPrivate()', which return false for 'Limited' visibility, unlike other categories that correctly reject non-public visibility using '!Visibility.IsPublic()'. This discrepancy allows a 'public-only' token to access repository and package content that should be restricted to internal users only. The vulnerability was confirmed on Gitea 1.26.2 with a proof-of-concept demonstrating unauthorized access to limited-visibility packages and repositories. Affected code paths include API v1 package endpoints, repository API endpoints, and web download endpoints, all of which fail to properly restrict access based on 'Limited' visibility.
Potential Impact
An attacker with a 'public-only' scoped personal access token can access repository and package content owned by users with 'Limited' visibility, which is intended to be internal-only. This results in unauthorized read access to potentially sensitive internal packages and repository data. The vulnerability does not allow write or modification actions, and the token scope enforcement correctly restricts other categories such as User and Organization. There are no known exploits in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, users should avoid using 'public-only' scoped tokens on repositories or packages owned by users with 'Limited' visibility or restrict the use of such tokens accordingly. Monitor official Gitea repositories and advisories for updates addressing this issue.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-7p4h-3gxq-x3h3
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-56443"]
- Ecosystems
- ["Go"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6a600abc9c2644c7f8fe2cd4
Added to database: 07/22/2026, 00:11:40 UTC
Last enriched: 07/22/2026, 00:53:06 UTC
Last updated: 07/22/2026, 02:07:18 UTC
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.