CVE-2020-14144 Arbitrary Code Execution in Gitea
Authenticated users can execute arbitrary code via git hooks if the feature is enabled, requiring careful configuration management.
- Exploited in the wild
- Not known
- Login needed
- An administrator
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2020-14144?
CVE-2020-14144 is a high-severity command injection vulnerability in Gitea Gitea, published on 16 Oct 2020. An attacker needs administrator access to exploit it, with no action from the victim.
Official 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.
Weakness: CWE-78
Which versions are affected by CVE-2020-14144?
3 open source packages ship an affected version, including code.gitea.io/gitea and gitea. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
code.gitea.io/gitea Go | From 1.1.0 | 1.12.6 |
code.gitea.io/gitea Go | From 1.1.0 | 1.12.6 |
gitea Bitnami | From 1.1.0 | 1.12.6 |
Products include Gitea Gitea.
How do I fix CVE-2020-14144?
Upgrade code.gitea.io/gitea to 1.12.6 or later.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2020-14144 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2020-14144 exists.
Public exploit code: 1 Metasploit module, 1 Nuclei template and 2 proofs of concept on GitHub.
Other vulnerabilities in Gitea Gitea
Sources
Also known as BIT-gitea-2020-14144, GHSA-3h6c-c475-jm7v.