Relative Path Traversal in gogs - CVE-2026-52813
Published: June 19, 2026
gogs
Detailed vulnerability description
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.