All vulnerabilities

Servers and applications

CVE-2026-52795

Authorization Bypass in Watch API allows any user to monitor private repository activity

Severity
Medium 4.3
Published
19 Jun 2026
Last changed
19 Jun 2026
Added to UpHeron
3 Nov 2026
Exploit chance
0.3% in the next 30 daysHigher than 20% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Incorrect authorization (CWE-863)
Attack
Over the network · Needs a user account · No user action needed
Attacker can
Read some data
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
Also known as
GHSA-v8w7-f6gc-cqc2
Sources
Project advisories (GitHub)

Description

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.

  • Gogs instance (latest main commit)
  • User A (victim): owns a private repository with active development
  • User B (attacker): any registered user with no access to User A's private repo

Response: 404 Not Found (correct, User B has no access).

Response: 200 OK with {"watching": true}. User B is now watching a private repo they cannot read.

User A pushes a commit, creates an issue, or opens a pull request in their private repository.

From gogs/gogs's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
GogsServers and applications · github:gogs/gogs
  • Version 0.15.0+dev

About Gogs

free forge based on Git written in Go

From Wikidata, CC0 1.0.
Docker Hub pulls
94,040,857Docker Hub, 15 Nov 2026
GitHub stars
47,939GitHub, 15 Nov 2026
Forks
5,082GitHub, 15 Nov 2026
Latest release
v0.14.4GitHub, 15 Nov 2026
Released
12 Nov 2026GitHub
Developer
FLOSS contributorWikidata
License
Expat licenseWikidata
Written in
Go, Cascading Style Sheets, JavaScriptWikidata
First released
11 Feb 2014Wikidata
First published on GitHub
12 Feb 2014GitHub

References