Link following in gogs - CVE-2026-52811

 

Link following in gogs - CVE-2026-52811

Published: June 19, 2026


Vulnerability identifier: #VU134897
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U/U:Green
CVE-ID: CVE-2026-52811
CWE-ID: CWE-59
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: gogs.io
Affected software:
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.


How to mitigate CVE-2026-52811

Install security update from vendor's website.

Sources