CVE-2026-52795: Gogs incorrect authorization in Watch API

CVE-2026-52795 · Severity: medium · CVSS 4.3 · Published 2026-06-24

Gogs is an open-source self-hosted Git service used by developers to manage source code. A security flaw allows any registered user to "watch" private repositories they do not have permission to access. Once watching, the unauthorized user can see sensitive information such as commit messages, branch names, and issue titles through their activity feed or email notifications, potentially exposing proprietary development details and internal project data.

Technologies: Gogs. Vendors: Gogs.

Quick answers

Is CVE-2026-52795 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-52795 being exploited in the wild.
How severe is CVE-2026-52795?
Medium severity, with a CVSS score of 4.3, published 24 June 2026.
Which products and versions are affected?
Gogs <= 0.14.3.
Is there a fix for CVE-2026-52795?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-52795 attacked?
It is attacked over the network, in a network appliance.
Am I affected by CVE-2026-52795?
Check whether you run Gogs at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

An incorrect authorization check (CWE-863) exists in the `repoWatchAction` function within `cmd/gogs/internal/web/webapi_repo.go`. The logic incorrectly returns a 404 error when a user *has* read access (`repoCtx.ViewerCanRead()`) instead of when they *lack* it (`!repoCtx.ViewerCanRead()`). An authenticated attacker can exploit this by sending a POST request to the Watch API for a private repository they do not own. Once subscribed, the system's `notifyWatchers()` and `retrieveFeeds()` functions propagate private repository metadata (commit messages, branch names, issue/PR titles) to the attacker's dashboard and email. The vulnerability is addressed in version 0.15.0+dev.

Affected products

  • Gogs Gogs <= 0.14.3

Timeline

  • 2026-06-19: advisory: GitHub Security Advisory published
  • 2026-06-24: disclosed: CVE published to NVD

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.