Off-by-one in gogs - CVE-2026-52804
Published: June 19, 2026
gogs
Detailed vulnerability description
The vulnerability allows a local user to escalate privileges.
The vulnerability exists due to an off-by-one error in the ChangeCollaborationAccessMode function when handling collaboration access mode changes from query parameters. A local user can send a specially crafted POST request with mode=4 to escalate privileges.
The issue affects the web route for collaboration settings, while the API route that uses ParseAccessMode is not affected. The escalated owner-level access persists across sessions.