CVE-2026-52795: Gogs: Authorization Bypass in Watch API allows any user to monitor private repository activity
Gogs is an open source self-hosted Git service. In 0.14.3 and earlier, any authenticated user can watch a private repository they have no access to, because the access check in the Watch API handler is inverted. The code checks if repoCtx.ViewerCanRead() (returns 404 when the user CAN read) instead of if !repoCtx.ViewerCanRead() (return 404 when the user CANNOT read). Once watching, the attacker's dashboard activity feed shows commit messages, branch names, issue titles, and PR details from the private repository. If email notifications are enabled, the attacker also receives emails containing issue and comment content.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Gogsto a version that resolves this vulnerability.Fixed in 0.14.3
Event History
Frequently Asked Questions
What is the severity of CVE-2026-52795?
The severity of CVE-2026-52795 is medium with a score of 4.3.
What impact does CVE-2026-52795 have on private repositories?
CVE-2026-52795 allows any authenticated user to watch a private repository they do not have access to.
How can I determine if I'm affected by CVE-2026-52795?
You are affected by CVE-2026-52795 if you are using Gogs version 0.14.3 or earlier.
How do I fix CVE-2026-52795?
To fix CVE-2026-52795, update Gogs to the latest version that addresses this vulnerability.
What is the main vulnerability in CVE-2026-52795?
The main vulnerability in CVE-2026-52795 is an authorization bypass in the Watch API handler due to an inverted access check.