
Cloud Vulnerability DB
An open project to list all known cloud vulnerabilities and Cloud Service Provider security issues
The built-in SSH server of Gogs through version 0.13.0 contains a critical vulnerability (CVE-2024-39930) that allows argument injection in internal/ssh/ssh.go, leading to remote code execution. The vulnerability was discovered in April 2023 and publicly disclosed in July 2024. This affects Gogs installations with the built-in SSH server enabled, particularly on Linux systems running Debian or Ubuntu. Windows installations are not affected (SonarSource Blog).
The vulnerability exists in how Gogs handles SSH environment variable requests. When processing 'env' type requests, the code executes the env command with user-controlled input without properly sanitizing arguments. Attackers can exploit this by using the '--split-string' option of the env command to inject arbitrary commands. The vulnerability has received a CVSS v3.1 score of 9.9 (Critical), indicating its severe impact. The issue specifically affects the env command implementation in GNU coreutils, while Alpine Linux's BusyBox implementation is not vulnerable (SonarSource Blog, NVD).
Successful exploitation allows authenticated attackers to execute arbitrary commands on the Gogs server with the same privileges as the Gogs service. This enables attackers to read all source code on the instance, modify any code, delete all code, or attack internal hosts reachable from the Gogs server. According to Shodan data, approximately 7,300 Gogs instances are publicly accessible over the internet, with about 60% located in China (Hacker News, SonarSource Blog).
Since the vulnerability remains unpatched in the latest version, users are recommended to implement the following mitigations: 1) Disable the built-in SSH server by setting STARTSSHSERVER = false in app.ini, or alternatively disable SSH entirely with DISABLESSH = true, 2) Disable user registration by setting DISABLEREGISTRATION = true in app.ini to prevent mass exploitation, 3) Consider switching to Gitea, a more actively maintained fork of Gogs that is not affected by these vulnerabilities (SonarSource Blog).
The security community has expressed concern about the vulnerability remaining unpatched despite being reported to maintainers in April 2023. The maintainers initially accepted the report but stopped communicating during the remediation process. This led security researchers to release their own unofficial patches and recommend users consider migrating to alternative solutions (SonarSource Blog).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
An open project to list all known cloud vulnerabilities and Cloud Service Provider security issues
A comprehensive threat intelligence database of cloud security incidents, actors, tools and techniques
A step-by-step framework for modeling and improving SaaS and PaaS tenant isolation
Get a personalized demo
“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
“We know that if Wiz identifies something as critical, it actually is.”