Off-by-one in gogs - CVE-2026-52804

 

Off-by-one in gogs - CVE-2026-52804

Published: June 19, 2026


Vulnerability identifier: #VU134906
CSH Severity: Low
CVSS v4: 7.1 [CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N]
CVE-ID: CVE-2026-52804
CWE-ID: CWE-193
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

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.


Affected software

gogs

How to mitigate CVE-2026-52804

Install security update from vendor's website.

gogs - update to 0.14.3

External References

Related Security Bulletins