CVE-2026-52795 Gogs: Authorization Bypass in Watch API allows any user to monitor private repository activity
An authenticated attacker can watch private repositories due to an inverted access check, exposing commit messages, branch names, and issue details.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2026-52795?
CVE-2026-52795 is a medium-severity missing authorization vulnerability in gogs, published on 24 Jun 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
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.
Weakness: CWE-863
Which versions are affected by CVE-2026-52795?
How do I fix CVE-2026-52795?
No fix has been published for CVE-2026-52795 yet. Limit exposure of the affected software until one is available.
Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.
Is CVE-2026-52795 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-52795 exists.
Sources
Also known as GHSA-v8w7-f6gc-cqc2.