Cyber 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 94th percentile
Risk Priority 78 floored blend · peak EPSS

Summary

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

Operationally, exploitation aligns with the MITRE ATT&CK technique Command and Scripting Interpreter (T1059); ranked in the top 6% 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

T1059 Command and Scripting Interpreter Execution
Adversaries may abuse command and script interpreters to execute commands, scripts, or binaries.
T1059.001 PowerShell Execution
Adversaries may abuse PowerShell commands and scripts for execution.
T1059.003 Windows Command Shell Execution
Adversaries may abuse the Windows command shell for execution.
T1059.004 Unix Shell Execution
Adversaries may abuse Unix shell commands and scripts for execution.
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-2025-64111Same product: Gogs Gogs
CVE-2022-2024Same product: Gogs Gogs
CVE-2024-39932Same product: Gogs Gogs
CVE-2022-0415Same product: Gogs Gogs
CVE-2026-24135Same product: Gogs Gogs
CVE-2026-26276Same product: Gogs Gogs
CVE-2026-22592Same product: Gogs Gogs
CVE-2026-25242Same 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) AI

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) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

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

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

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

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

prevents

Secure development lifecycle mandates input validation and command construction practices that directly prevent argument injection.

prevents

Application security requirements include explicit rules for safe command-line argument handling and escaping.

prevents

Secure architecture principles discourage unsafe command invocation patterns and favor safer APIs.

prevents

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

none

Change management can catch unsafe command patterns during reviews but is not a direct mitigation.

References