Security Resilience

CVE-2024-39930

Gogs ≤ 0.13.0

Public PoC
Published
04 July 2024
Modified
11 April 2025
CVSS Score v3.1 9.9
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
EPSS Score 0.077 95th percentile
Risk Priority 78 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2024-39930 is a critical-severity Argument Injection (CWE-88) vulnerability in Gogs. Its CVSS base score is 9.9 (Critical).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploitation for Privilege Escalation (T1068); ranked in the top 5% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SI-10 (Information Input Validation) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

The vulnerability CVE-2024-39930 is an argument injection issue in the built-in SSH server of Gogs through version 0.13.0, located in internal/ssh/ssh.go. It enables remote code execution on affected systems when the built-in SSH server is activated, though Windows installations remain unaffected. The flaw carries a CVSS score of 9.9 and is categorized under CWE-88.

Authenticated attackers can exploit the weakness by opening an SSH connection to a vulnerable Gogs instance and supplying a malicious --split-string environment request, resulting in arbitrary code execution with high impact on confidentiality, integrity, and availability.

References including the Gogs GitHub releases and detailed analyses from SonarSource and Vicarius recommend upgrading to a patched release beyond 0.13.0 as the primary mitigation, with the project advisories directing administrators to apply available updates promptly.

The associated EPSS score has remained flat at 0.1188 with no material rise observed.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

is activated. Windows installations are unaffected.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

MITRE ATT&CK v20.0

T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
T1083 File and Directory Discovery Discovery
Adversaries may enumerate files and directories or may search in specific locations of a host or network share for certain information within a file system.
T1105 Ingress Tool Transfer Command And Control
Adversaries may transfer tools or other files from an external system into a compromised environment.
T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1203 Exploitation for Client Execution Execution
Adversaries may exploit software vulnerabilities in client applications to execute code.
T1212 Exploitation for Credential Access Credential Access
Adversaries may exploit software vulnerabilities in an attempt to collect credentials.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-26194Same product: Gogs Gogs
CVE-2024-39933Same product: Gogs Gogs
CVE-2024-39932Same product: Gogs Gogs
CVE-2022-2024Same product: Gogs Gogs
CVE-2025-64111Same product: Gogs Gogs
CVE-2024-54148Same product: Gogs Gogs
CVE-2024-44625Same product: Gogs Gogs
CVE-2022-1993Same product: Gogs Gogs
CVE-2025-8110Same product: Gogs Gogs
CVE-2024-55947Same product: Gogs Gogs

Affected Assets

gogs
gogs
≤ 0.13.0

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

—

Detect
Catch it (NIST detect / respond)

—

Harden
Shrink the surface (DISA STIG)

—

Validate
Prove the fix (OWASP ASVS)
  • V1.2.5

Mitigating Controls (NIST 800-53 r5)

Our mappings, made for this CVE.

Developer testing can discover argument-injection flaws in command-construction code but does not stop their introduction.

Input validation directly stops construction of command strings containing unneutralized delimiters or injected arguments.

Mitigating Controls (NIST CSF 2.0)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.

PR.PS-06 mostly match
blocks

Secure SDLC practices directly require proper input validation and command construction to prevent argument injection.

Mitigating Controls (ISO/IEC 27001:2022 Annex A)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.

finds

Security testing can detect argument injection but does not prevent it at the source.

prevents

Training developers about secure command construction and argument handling reduces argument injection instances, but the practice is fallible and most such flaws still slip through, matching the same partial rung A.6.3 and A.8.28 hold on other developer-introduced injection flaws.

prevents

Secure coding standards explicitly require proper neutralization of command arguments, directly eliminating CWE-88.

prevents

A.8.30 carries its effect through the secure-development practices (8.25-8.29) its contract requires of the supplier, and argument injection is an ordinary software implementation weakness those practices address; the clause sits at its declared ceiling of `partial` because the underlying practices are fallible and the clause depends on them being implemented by the supplier.

finds

A.8.8's reach is DISCLOSURE — it identifies vulnerabilities through published advisories, vendor notifications, and scanning against known CVE feeds. CWE-88 does surface as CVEs in third-party components (PHPMailer, browsers, mail clients, etc., per the observed examples), so a minority of instances are findable. The bulk of argument injection lives in custom first-party code with no published advisory, which A.8.8's disclosure-based programme does not reach — same scope seam as A.8.8 -> CWE-89.

References