Path traversal in gogs - #VU170289
Published: November 25, 2026
Vulnerability details
The vulnerability allows a remote user to read arbitrary files accessible to the Gogs process on Windows, including configuration files containing secrets and database credentials.
The vulnerability exists due to path traversal in the repository AutoInit template loader when it normalizes user-supplied template names without accounting for Windows path separators. A remote user can supply a crafted template name through the repository creation form or API to retrieve file contents from the new repository's initial commit.