OS Command Injection in gogs - CVE-2022-1986
Published: June 8, 2022 / Updated: April 27, 2026
gogs
gogs.io
Description
The vulnerability allows a remote user to gain SSH access to the server.
The vulnerability exists due to command injection in the file editor when updating a crafted config file into a repository's .git directory in combination with crafted file deletion. A remote user can upload and delete crafted files to gain SSH access to the server.
Only installations with repository upload enabled are vulnerable.