OS Command Injection in gogs - CVE-2022-2024
Published: February 25, 2023 / 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 improper neutralization of special elements used in an os command in the repo editor upload path handling for the repository's .git directory when processing crafted repository uploads and file deletions on case-insensitive file systems. A remote user can upload a crafted config file and trigger crafted file deletion to gain SSH access to the server.
Only installations with repository upload enabled on case-insensitive file systems are vulnerable.