PT-2023-9256

CVE-2024-39930

·

Published

2023-04-20

·

Updated

2026-08-29

Description by

CVSS 3.1
9.9
Critical
MetricsAC: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.
Exploitability
Exploit
Fix
Impacts
Researchers
Vendors
Affected products
Related identifiers
GHSA-P69R-V3H4-RJ4F
GHSA-VM62-9JW3-C8W3
GO-2024-2969
Found an issue in the description? Have something to add? Feel free to write us 👾