Cyber Resilience

CVE-2022-0415

HighPublic PoC

Published: 21 March 2022

Published
21 March 2022
Modified
21 November 2024
KEV Added
Patch
CVSS Score v3.1 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.8961 99.6th percentile
Risk Priority 71 60% EPSS · 20% KEV · 20% CVSS

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

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

gogs
gogs
≤ 0.12.6

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.

addresses: CWE-434

Requiring identifiable owners for portable devices reduces the attack surface for unrestricted uploads of dangerous file types via anonymous media.

addresses: CWE-20

Security testing and developer training directly verify and enforce proper input validation, reducing exploitability of injection and malformed-data weaknesses.

addresses: CWE-20

Security testing and evaluation at multiple SDLC stages directly detects missing or flawed input validation, with the required remediation process ensuring fixes are applied.

addresses: CWE-434

Dangerous file uploads can be detonated in the chamber to determine malice before any production write or execution occurs.

addresses: CWE-434

Prevents unrestricted writing of arbitrary or malicious firmware by keeping hardware write-protect enabled except under tightly controlled manual procedures.

addresses: CWE-20

Directly implements checks on information inputs to reject invalid data before processing.

addresses: CWE-434

Scans files from external sources on download/open/execute, blocking unrestricted uploads of dangerous file types.

addresses: CWE-20

Spam protection mechanisms perform filtering and detection on inbound/outbound messages, directly compensating for missing or weak input validation of unsolicited content.

References