Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling File access restriction
MITRE ATT&CK
2 techniques across 1 tactic: Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Impact | This vulnerability presents CRITICAL real-world risk across multiple dimensions: (1) CVSS Vector indicates maximum severity with network-based attacks (AV:N), no authentication required (PR:N), no user interaction (UI:N), and complete scope change (S:C), affecting confidentiality, integrity, and availability (C:H/I:H/A:H). (2) Attack complexity is LOW (AC:L), indicating straightforward exploitation without special conditions. (3) The vulnerability is unauthenticated and remotely exploitable, making it accessible to any attacker with network access. (4) The incomplete patch status (CVE-2024-39931 not fully resolved) suggests attackers have likely already identified bypass techniques. (5) Command execution occurs with RUN_USER privileges, typically a service account with repository access, enabling lateral movement and data exfiltration across all hosted repositories. (6) This is not a theoretical high-CVSS issue—it represents immediate, practical exploitation risk for any Gogs instance running versions prior to 0.13.3. The SSVC framework would rate this IMMEDIATE for patching: exploitation is straightforward, automation is feasible (shell command injection), and technical impact is complete system compromise. |
| Exploit ScenarioDerived | An unauthenticated attacker discovers a target organization running Gogs 0.13.2. The attacker sends a crafted HTTP request to the Gogs API or web interface, exploiting the incomplete .git directory access controls to delete critical git hook files (e.g., post-receive hooks). The attacker then creates a malicious post-receive hook that executes shell commands. When a legitimate user or automated process pushes code to the repository, the hook triggers, executing the attacker's injected commands (e.g., creating a reverse shell, exfiltrating credentials, installing persistence mechanisms) with the privileges of the RUN_USER account. This grants the attacker persistent access to the Gogs server and potential lateral movement to other systems. Alternatively, if a proof-of-concept exploit exists (likely, given the publicly disclosed nature and perfect CVSS score), attackers may be using automated scanning and exploitation against publicly exposed Gogs instances. The attack requires zero authentication, zero user interaction, and exploits a straightforward file deletion+injection technique, making it highly likely to be actively exploited in the wild. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 15, 2026
CVE-2024-56731 is a critical remote code execution vulnerability in Gogs (self-hosted Git service) versions prior to 0.13.3, where unprivileged users can delete files in the .git directory and achieve arbitrary command execution due to an incomplete patch of CVE-2024-39931. An unauthenticated remote attacker can execute arbitrary commands with the privileges of the RUN_USER account, compromising all code repositories and user data on affected instances. This represents an actively exploitable vulnerability with a perfect CVSS 3.1 score of 10.0 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H), indicating network accessibility, low attack complexity, no privilege requirements, and complete system compromise.
RemediationAI
patch: Upgrade Gogs to version 0.13.3 or later immediately; priority: CRITICAL; details: Download and deploy Gogs 0.13.3+ from official repository (https://github.com/gogs/gogs) workaround: Restrict network access to Gogs service; priority: IMMEDIATE; details: Implement network segmentation, firewall rules, or VPN requirements to limit access to trusted networks only while patch is being deployed workaround: Disable repository operations if possible; priority: HIGH; details: Temporarily restrict git push/pull operations or place Gogs instance in read-only mode until patched detection: Monitor for suspicious .git directory modifications; priority: HIGH; details: Implement file integrity monitoring on .git directories and audit logs for deletion operations on git internal files hardening: Review RUN_USER privileges; priority: MEDIUM; details: Ensure RUN_USER account operates with minimal necessary privileges; use containerization/sandboxing to limit impact of code execution
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in go, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Gogs is an open-source Git version control service written in Go that allows self-hosted git repository management. The vulnerability exploits insufficient validation in file deletion operations within git repository management, specifically allowing manipulation of the .git directory structure. This vulnerability relates to CWE-552 (Files or Directories Accessible to External Parties), indicating improper access control on critical git metadata. The root cause stems from an incomplete security patch for CVE-2024-39931, suggesting the original mitigation did not adequately restrict all attack vectors for .git directory manipulation. The vulnerability allows attackers to delete critical git internal files (hooks, objects, refs), which can be leveraged to inject malicious git hooks that execute arbitrary commands when git operations occur. Affected CPE: cpe:2.3:a:gogs:gogs:*:*:*:*:*:*:*:* (versions < 0.13.3).
Know when Gogs gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
Sources disagree (Low–Critical)AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
vuln.today treats the vendor’s rating as authoritative. A higher third-party CVSS (e.g. CISA-ADP) is shown for transparency but does not drive the headline severity.
CVSS VectorGitHub Advisory
Lifecycle Timeline
2DescriptionGitHub Advisory
Gogs is an open source self-hosted Git service. Prior to version 0.13.3, it's still possible to delete files under the .git directory and achieve remote command execution due to an insufficient patch for CVE-2024-39931. Unprivileged user accounts can execute arbitrary commands on the Gogs instance with the privileges of the account specified by RUN_USER in the configuration. Allowing attackers to access and alter any users' code hosted on the same instance. This issue has been patched in version 0.13.3.
Executive ViewAI
A critical vulnerability in Gogs allows unauthenticated attackers to execute arbitrary commands on affected instances, potentially compromising all source code and user data hosted on the platform. Organizations running Gogs versions prior to 0.13.3 face immediate risk of data theft, code manipulation, and lateral movement within their infrastructure.
Apply vendor patch. If immediate patching is not feasible: restrict network access to Gogs instances using firewall rules to trusted IP ranges only; disable public repository creation and enforce private repositories; implement strict network segmentation isolating Gogs from production systems; enable enhanced logging and monitoring for git operations and system command execution; consider temporary service shutdown until patch deployment is completed.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Related Vulnerabilities in Gogs Path Traversal and XSS Vulnerabilities
View all 2Code execution on Gogs servers is possible through improper symbolic-link handling in the repository file editor's PutCo
Multiple SQL injection vulnerabilities in Gogs (aka Go Git Service) 0.3.1-9 through 0.5.x before 0.5.6.1105 Beta allow r
The git hook feature in Gogs 0.5.5 through 0.12.2 allows for authenticated remote code execution. Rated high severity (C
Gogs through 0.13.0 allows argument injection during the previewing of changes. Rated critical severity (CVSS 9.9), this
The built-in SSH server of Gogs through 0.13.0 allows argument injection in internal/ssh/ssh.go, leading to remote code
Gogs self-hosted Git service v0.13.3 has a command injection vulnerability enabling remote code execution through crafte
Unauthenticated file upload in Gogs self-hosted Git service 0.13.4 and below. Default configuration exposes file upload
OS Command Injection in GitHub repository gogs/gogs prior to 0.12.9. Rated critical severity (CVSS 9.8), this vulnerabil
Gogs 0.11.66 allows remote code execution because it does not properly validate session IDs, as demonstrated by a ".." s
Supply chain attack via LFS object overwrite across repos in Gogs before 0.14.2. PoC and patch available.
Path Traversal in GitHub repository gogs/gogs prior to 0.12.9. Rated critical severity (CVSS 9.1), this vulnerability is
Missing Authorization in GitHub repository gogs/gogs prior to 0.12.5. Rated critical severity (CVSS 9.1), this vulnerabi
Vendor StatusVendor
SUSE
Severity: Low| Product | Status |
|---|---|
| SUSE Linux Enterprise Server 16.0 | Fixed |
| openSUSE Tumbleweed | Fixed |
EUVD-2024-54695
GHSA-wj44-9vcg-wjq7
NVD
CVE.org
EPSS
Exploit-DB