OS Command Injection in gogs - CVE-2022-1884

 

OS Command Injection in gogs - CVE-2022-1884

Published: May 31, 2022 / Updated: April 27, 2026


Vulnerability identifier: #VU128085
CSH Severity: Medium
CVSS v4: 8.7 [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]
CVE-ID: CVE-2022-1884
CWE-ID: CWE-78
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote user to gain SSH access to the server.

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

Only Windows installations with repository upload enabled are vulnerable.


Affected software

gogs

How to mitigate CVE-2022-1884

Install security update from vendor's website.

gogs - update to 0.12.8

External References

Related Security Bulletins