Link following in gogs - CVE-2024-56731
Published: April 27, 2026
gogs
Detailed vulnerability description
The vulnerability allows a remote attacker to execute arbitrary commands.
The vulnerability exists due to improper handling of symbolic links in file deletion logic when deleting files through a symbolic link that points to the .git directory. A remote attacker can create a symbolic link that points to the .git directory and delete internal repository files to execute arbitrary commands.
Successful exploitation can lead to command execution with the privileges of the account specified by RUN_USER in the configuration.