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.0: 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/E:U/U:Clear
CVE-ID: CVE-2026-52804
CWE-ID: CWE-193
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: gogs.io
Affected software:
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.


How to mitigate CVE-2026-52804

Install security update from vendor's website.

Sources