Remote Command Execution in Gogs by Unprivileged Users
CVE-2021-32546
8.8HIGH
What is CVE-2021-32546?
A vulnerability in the Gogs platform allows unprivileged registered users to execute arbitrary commands remotely. This occurs due to a lack of input validation in the file 'internal/db/repo_editor.go'. Attackers can overwrite the Git configuration in their repositories, leveraging this to execute commands via an 'sshCommand' option in the configuration. By manipulating the repository's configuration, a malicious user can introduce harmful code that executes when the master branch points to a malicious remote branch, thereby compromising the server.