Skip to main content
ExploitPublished

gogs 0.13.0 · Remote Code Execution (RCE)

Source Exploit-DB RSS Feed

0
Severity
Critical

Rated by Threat Radar

Data as of 23 Jul 2025, 01:53 UTC

What to do

AI-suggested

Organizations should immediately audit their infrastructure to identify any instances of Gogs version 0.13.0. Given the absence of official patches, mitigation should include isolating affected servers from critical network segments and restricting external access. Employing web application firewalls (WAFs) with custom rules to detect and block exploit attempts targeting known RCE vectors in Gogs is recommended. Monitoring logs for unusual activity related to repository access or server commands can provide early detection. Where possible, upgrading to a later, patched version of Gogs or migrating to alternative Git hosting solutions with active security support is advised. Implementing strict network segmentation and applying the principle of least privilege to service accounts running Gogs will limit the impact of any successful exploitation.

Description

gogs 0.13.0 - Remote Code Execution (RCE)

Indicators of compromise

Exploit source code

Exploit code for gogs 0.13.0 - Remote Code Execution (RCE)6,322 characters
# Exploit Title: gogs 0.13.0 - Remote Code Execution (RCE) 
# Date: 27th June, 2025
# Exploit Author: Ardayfio Samuel Nii Aryee
# Software link: https://github.com/gogs/gogs.git
# Version: gogs <=0.13.0
# Tested on: Ubuntu
# CVE: CVE-2024-39930


# ===============================
# Example Usage:
# python3 exploit.py http://gogs.local:3000 alice:password123 ~/.ssh/id_rsa ~/.ssh/id_rsa.pub "touch /tmp/pwned"
# python3 exploit.py http://gogs.local:3000 alice:password123 ~/.ssh/id_rsa ~/.ssh/id_rsa…

References

Community reviews

Loading reviews…