PT-2023-9256 · Gogs · Gogs

Akos Jakab

+1

·

Published

2023-04-20

·

Updated

2026-05-29

·

CVE-2024-39930

CVSS v3.1

9.9

Critical

VectorAC: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 0.13.0 and earlier
Description The built-in SSH server of Gogs allows argument injection in internal/ssh/ssh.go, leading to remote code execution. Authenticated attackers can exploit this by opening an SSH connection and sending a malicious --split-string env request if the built-in SSH server is activated. Approximately 7,300 exposed instances are affected, with 60% located in China. Users are urged to disable SSH and registration to minimize the risk.
Recommendations For Gogs versions 0.13.0 and earlier, upgrade to version 0.13.1 or the latest 0.14.0+dev to resolve the issue. As a temporary workaround, consider disabling the built-in SSH server on operating systems other than Windows. Restrict access to the internal SSH server to minimize the risk of exploitation. Avoid using the --split-string env request in the affected SSH connection until the issue is resolved.

Exploit

Fix

RCE

Argument Injection

Weakness Enumeration

Related Identifiers

BDU:2024-05765
CVE-2024-39930
GHSA-P69R-V3H4-RJ4F
GHSA-VM62-9JW3-C8W3
GO-2024-2969

Affected Products

Gogs