PT-2026-51622 · Gogs · Gogs
Published
2026-06-23
·
Updated
2026-06-23
·
CVE-2026-52804
CVSS v4.0
5.5
Medium
| Vector | AV:N/AC:L/AT:N/PR:H/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N/E:P |
Name of the Vulnerable Software and Affected Versions
Gogs (affected versions not specified)
Description
A repository admin collaborator can escalate their privileges to owner-level access due to an off-by-one error in the
ChangeCollaborationAccessMode() function. This occurs because the validation check allows the mode variable to be set to the value associated with owner access. An attacker can exploit this by sending a POST request to the '/{owner}/{repo}/settings/collaboration/access mode' endpoint with the mode parameter set to 4. Successful exploitation grants the attacker owner-level permissions, enabling them to delete the repository, transfer repository ownership, and erase wiki data. These escalated permissions persist across sessions as the access table is updated.Recommendations
As a temporary workaround, restrict access to the '/{owner}/{repo}/settings/collaboration/access mode' endpoint or avoid using the
mode parameter with a value of 4 until a patch is available.
At the moment, there is no information about a newer version that contains a fix for this vulnerability. Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Gogs