Vulnerability in Gogs
CVE-2024-39930
The built-in SSH server of Gogs through 0.13.0 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. Windows installations are unaffected.
Published · last modified .
CVSS v3 metric
CVSS v3 base score 9.9 (Critical). Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H.
EPSS exploit prediction
EPSS 0.077, 94.7th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
Weakness classification (CWE)
Public exploits and proof-of-concept code
3 public repositories with exploit or proof-of-concept code for this CVE:
- laachy/CVE-2024-39930-ptrace-detection-mitigation (last pushed 2025-10-14)
- alexander47777/-CVE-2024-39930 (last pushed 2025-07-22): Gogs Under Attack: Unpacking the Critical SSH Vulnerability (CVE-2024–39930)
- theMcSam/CVE-2024-39930-PoC (last pushed 2025-07-01): Exploit Code for CVE-2024-39930 gogs ssh server RCE
Also mentioned in 4 other repositories (fkie-cad/nvd-json-data-feeds, plzheheplztrying/cve_monitor, PuddinCat/GithubRepoSpider, …). These reference the CVE in a list, notes or a scanner and are not exploit code for it.
References
- github.com/gogs/gogs/releases (Release Notes)
- www.sonarsource.com/blog/securing-developer-tools-unpatched-code-vulnerabilitie… (Third Party Advisory)
- www.vicarius.io/vsociety/posts/argument-injection-in-gogs-ssh-server-cve-2024-3… (Exploit, Third Party Advisory)
This CVE has public exploit evidence. See the latest CVEs with public exploits.