CVE-2022-0415
Published: 21 March 2022
Summary
CVE-2022-0415 is a high-severity Improper Input Validation (CWE-20) vulnerability in Gogs Gogs. Its CVSS base score is 8.8 (High).
Operationally, ranked in the top 0.4% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.
Deeper analysis
CVE-2022-0415 is a remote command execution vulnerability affecting the repository file upload functionality in Gogs versions prior to 0.12.6. The flaw stems from insufficient input validation (CWE-20) and unrestricted upload of files with dangerous types (CWE-434), allowing an attacker to supply a malicious file that results in arbitrary command execution on the server. It carries a CVSS 3.1 base score of 8.8 with network attack vector, low complexity, and low privileges required.
An authenticated user with repository write access can exploit the issue over the network by uploading a crafted file during the repository file upload process. Successful exploitation grants the attacker full control over confidentiality, integrity, and availability on the affected Gogs instance, enabling execution of arbitrary operating-system commands.
Public references point to the corrective commit in the Gogs repository and the associated huntr.dev disclosure; the recommended mitigation is to upgrade to version 0.12.6 or later, which contains the fix for the upload handling logic.
The EPSS score remains elevated, with a current value of 0.8961 and a recorded peak of 0.9030, indicating sustained exploitation interest following disclosure.
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2022-1322
Vulnerability details
Remote Command Execution in uploading repository file in GitHub repository gogs/gogs prior to 0.12.6.
- CWE(s)
Related Threats
No named actor attribution yet. ATT&CK technique mapping in progress for this CVE.
Affected Assets
Mitigating Controls
Likely Mitigating Controls AI
Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.
Requiring identifiable owners for portable devices reduces the attack surface for unrestricted uploads of dangerous file types via anonymous media.
Security testing and developer training directly verify and enforce proper input validation, reducing exploitability of injection and malformed-data weaknesses.
Security testing and evaluation at multiple SDLC stages directly detects missing or flawed input validation, with the required remediation process ensuring fixes are applied.
Dangerous file uploads can be detonated in the chamber to determine malice before any production write or execution occurs.
Prevents unrestricted writing of arbitrary or malicious firmware by keeping hardware write-protect enabled except under tightly controlled manual procedures.
Directly implements checks on information inputs to reject invalid data before processing.
Scans files from external sources on download/open/execute, blocking unrestricted uploads of dangerous file types.
Spam protection mechanisms perform filtering and detection on inbound/outbound messages, directly compensating for missing or weak input validation of unsolicited content.