Description
The git hook feature in Gitea 1.1.0 through 1.12.5 might allow for authenticated remote code execution in customer environments where the documentation was not understood (e.g., one viewpoint is that the dangerousness of this feature should be documented immediately above the ENABLE_GIT_HOOKS line in the config file). NOTE: The vendor has indicated this is not a vulnerability and states "This is a functionality of the software that is limited to a very limited subset of accounts. If you give someone the privilege to execute arbitrary code on your server, they can execute arbitrary code on your server. We provide very clear warnings to users around this functionality and what it provides.
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
Gitea Git Hooks Remote Code Execution
exploit/multi/http/gitea_git_hooks_rce
GitHub 2 repositories
-
p0dalirius/CVE-2020-14144-GiTea-git-hooks-rce ★ 32 · Mar 8, 2022
A script to exploit CVE-2020-14144 - GiTea authenticated Remote Code Execution using git hooks
-
Mohnad-AL-saif/Gitea-Git-Hooks-RCE-CVE-2020-14144- ★ 0 · Feb 14, 2026
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 execu…
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Automated scanner template
A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.
- Gitea 1.1.0 - 1.12.5 - Remote Code Execution http/cves/2020/CVE-2020-14144.yaml
Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Go | code.gitea.io/gitea | >= 1.1.0, < 1.12.6 | 1.12.6 | GHSA-3h6c-c475-jm7v |
Advisories 1
- WID-SEC-2024-0945 Gitea: Schwachstelle ermöglicht Codeausführung BSI CERT-Bund (WID) · Apr 22, 2024
References
- https://github.com/go-gitea/gitea/releases
- https://www.fzi.de/en/news/news/detail-en/artikel/fsa-2020-3-schwachstelle-in-gitea-1125-und-gogs-0122-ermoeglicht-ausfuehrung-von-code-nach-authent/
- https://github.com/go-gitea/gitea/pull/13058
- https://docs.gitlab.com/ee/administration/server_hooks.html
- https://docs.github.com/en/enterprise-server%402.19/admin/policies/creating-a-pre-receive-hook-script
- http://packetstormsecurity.com/files/162122/Gitea-Git-Hooks-Remote-Code-Execution.html
- https://github.com/PandatiX/CVE-2021-28378
- https://github.com/PandatiX/CVE-2021-28378#notes