Input validation error in gogs - CVE-2022-0415

 

Input validation error in gogs - CVE-2022-0415

Published: March 21, 2022 / Updated: April 27, 2026


Vulnerability identifier: #VU128090
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-2022-0415
CWE-ID: CWE-20
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 gain SSH access to the server.

The vulnerability exists due to improper input validation in repository file upload handling when uploading files to a repository. A remote user can upload a crafted config file into the repository's .git directory to gain SSH access to the server.

Only installations with repository upload enabled are vulnerable.


How to mitigate CVE-2022-0415

Install security update from vendor's website.

Sources