Summary
An improper authorization control in Gitea allows draft release data and attachments to be accessed without the required write permissions.
This means users with insufficient privileges may view or download draft materials whenever they can reach the affected release endpoints.
Affected context
The vulnerability affects Gitea instances that rely on draft releases to stage content before publication.
It manifests in endpoints or code paths where draft release metadata or attachments are exposed without verifying that the caller has the appropriate write permissions.
Environments with shared repositories, multi-tenant setups, or external user access are more exposed, as users may unintentionally gain visibility into pre-release assets.
Exploit preconditions
- Attack surface: HTTP(S) API and web UI endpoints that handle draft release data and attachments.
- Required access: Any user account or session that can access the repository or corresponding routes, even without write permission.
- Trigger point: Issuing requests to view or download draft release content that should normally require elevated privileges.
- Why exploitation is possible: Authorization checks fail to enforce write-level permissions for draft releases, allowing users with lesser roles to retrieve restricted data.
Why this happens
The root cause aligns with CWE-284: Improper Access Control, specifically missing or incomplete authorization checks on draft release resources.
The application distinguishes between draft and published releases but does not consistently apply write-permission checks before serving draft data or attachments.
This leads to a condition where read-capable or otherwise limited users can access information that was intended to remain confined to maintainers or users with write access.
Potential impact
- Unauthorized users may view draft release notes, change logs, or internal planning information.
- Pre-release artifacts, binaries, or attachments may be downloaded ahead of schedule.
- Leakage of sensitive or proprietary information embedded in draft release content.
- Erosion of release management workflows and trust in access control boundaries.
General mitigation guidance
Mitigation generally focuses on tightening authorization around resource access and clarifying privilege boundaries for draft content.
Recommended patterns include:
- Ensuring all endpoints serving draft releases or attachments perform explicit, centralized permission checks for write-level access.
- Using role-based access control (RBAC) abstractions to avoid ad-hoc permission logic scattered throughout the codebase.
- Applying "deny by default" policies for draft or unpublished resources, requiring explicit grants before exposure.
- Regularly reviewing access control rules around sensitive workflow stages such as drafts, pre-releases, and internal builds.
How teams detect issues like this
Detection can combine code-centric and operational approaches:
- Static analysis and code review focused on resource controllers handling releases, verifying that they call consistent authorization helpers.
- Security review of routes or handlers that differ in authorization behavior between draft and published states.
- Logging and monitoring access to draft release endpoints, flagging reads by accounts lacking write-level permissions.
- Automated tests or security regression suites that attempt to access draft resources under various roles to confirm proper enforcement.

