Executive brief
Gogs is an open-source service used by organizations to host and manage Git repositories. A security flaw allowed users with basic 'write' access to change administrative repository settings that should have been restricted to owners. An attacker could use this to disable project wikis, disrupt issue tracking, or redirect users to malicious external websites, potentially damaging project operations and user trust.
Technical details
An authorization bypass vulnerability exists in Gogs due to incorrect permission checks on specific API endpoints. While the web interface correctly requires administrative privileges (AccessModeAdmin) to modify repository settings, the API endpoints for managing the issue tracker, wiki, and mirror synchronization were incorrectly gated by a lower-level 'writer' check (AccessModeWrite). A network-based attacker with write-level collaborator access can bypass these intended restrictions by making direct API calls. This allows the attacker to disable features, trigger unauthorized mirror syncs, or perform URL injection to redirect repository visitors to external sites. The issue is resolved in version 0.14.3 by updating the route registration to use the reqRepoAdmin() middleware.
Affected products
- Gogs Gogs < 0.14.3
Timeline
- 2026-06-06: patched: Fix merged into main branch
- 2026-06-07: other: Version 0.14.3 released
- 2026-06-19: advisory: GitHub Security Advisory published
- 2026-06-24: disclosed: CVE published to NVD