PT-2023-9256 · Gogs · Gogs
CVSS v3.1
9.9
Critical
| Vector | AC:L/AV:N/A:H/C:H/I:H/PR:L/S:C/UI:N |
Name of the Vulnerable Software and Affected Versions
Gogs versions prior to 0.13.1
Description
The built-in SSH server allows argument injection in
internal/ssh/ssh.go, which can lead to remote code execution. Authenticated attackers with at least one SSH key can exploit this by opening an SSH connection and sending a malicious --split-string request via the env command if the built-in SSH server is enabled (configured as [server] START SSH SERVER = true). This allows the attacker to execute arbitrary commands with the privileges of the user specified by RUN USER in the configuration, potentially enabling access to or alteration of any user's code on the instance. Windows installations are not affected. Approximately 7,300 to 8,300 exposed instances have been identified.Recommendations
Upgrade to version 0.13.1 or the latest 0.14.0+dev.
As a temporary workaround, disable the use of the built-in SSH server on non-Windows operating systems.
Exploit
Fix
RCE
Argument Injection
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Gogs