Link following in gogs - CVE-2026-52811
Published: June 19, 2026
gogs
Detailed vulnerability description
The vulnerability allows a remote user to execute arbitrary code.
The vulnerability exists due to improper link resolution before file access in (*Repository).UploadRepoFiles when processing a multipart upload with a crafted filename that traverses a previously committed parent directory symlink. A remote user can upload and commit a specially crafted file to execute arbitrary code.
The issue affects Linux and macOS environments and requires repository write access. A literal backslash in the uploaded filename is converted into a path separator, allowing the write to escape the repository working tree through a committed directory symlink.