Relative Path Traversal in gogs - CVE-2026-52813

 

Relative Path Traversal in gogs - CVE-2026-52813

Published: June 19, 2026


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

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary code.

The vulnerability exists due to path traversal in organization name handling in internal/database/org.go and repository path resolution when processing organization and repository creation requests. A remote attacker can create an organization name containing traversal sequences and a nested repository to overwrite Git hook files and execute arbitrary code.

In the default configuration, self-registration and organization creation are enabled, and successful exploitation results in code execution as the git user.


Affected software

gogs

How to mitigate CVE-2026-52813

Install security update from vendor's website.

gogs - update to 0.14.3

External References

Related Security Bulletins