CVE-2020-14144: Code.gitea.io/gitea Arbitrary Code Execution Vulnerability
HIGHCVE-2020-14144 is a HIGH (CVSS 7.2) arbitrary code execution vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Code.gitea.io/gitea libraries in the Go ecosystem. The issue involves arbitrary code execution in gitea. Remediation is available by upgrading affected packages to version 1.12.6.
CVE-2020-14144 at a Glance
Security Impact
CVSS: 7.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2020-14144
To remediate this vulnerability, upgrade all affected Code.gitea.io/gitea dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade code.gitea.io/gitea to 1.12.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for code.gitea.io/gitea
How to Check if You Are Affected
To determine whether your application is affected by CVE-2020-14144, inspect your project dependencies for Code.gitea.io/gitea:
inspect dependencies for code.gitea.io/gitea
Analyze the terminal output to locate any version of Code.gitea.io/gitea in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.12.6), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Code.gitea.io/gitea, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-14144 Affected Code.gitea.io/gitea Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
code.gitea.io/gitea
|
Go |
≥ 1.1.0
< 1.12.6
|
1.12.6
|
References
Frequently Asked Questions
What is CVE-2020-14144?
Which Code.gitea.io/gitea versions are affected?
What version fixes CVE-2020-14144?
Is code.gitea.io/gitea affected?
What is the CVSS score of CVE-2020-14144?
What CWE is associated with CVE-2020-14144?
How can I check Go dependencies for CVE-2020-14144?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3h6c-c475-jm7v",
"modified" : "2024-04-22T19:07:03Z",
"published" : "2024-04-22T19:07:03Z",
"aliases" : [ "CVE-2020-14144" ],
"summary" : "Arbitrary Code Execution in Gitea",
"details" : "The git hook feature in Gitea 1.1.0 through 1.12.5 allows for authenticated remote code execution.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "code.gitea.io/gitea"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.1.0"
}, {
"fixed" : "1.12.6"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-14144"
}, {
"type" : "WEB",
"url" : "https://github.com/go-gitea/gitea/pull/13058"
}, {
"type" : "WEB",
"url" : "https://github.com/go-gitea/gitea/commit/8fe8ab5cbf2977f3a01ea12361df2cd76dce3ea9"
}, {
"type" : "WEB",
"url" : "https://docs.github.com/en/enterprise-server%402.19/admin/policies/creating-a-pre-receive-hook-script"
}, {
"type" : "WEB",
"url" : "https://docs.github.com/en/enterprise-server@2.19/admin/policies/creating-a-pre-receive-hook-script"
}, {
"type" : "WEB",
"url" : "https://docs.gitlab.com/ee/administration/server_hooks.html"
}, {
"type" : "WEB",
"url" : "https://github.com/PandatiX/CVE-2021-28378"
}, {
"type" : "WEB",
"url" : "https://github.com/PandatiX/CVE-2021-28378#notes"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/go-gitea/gitea"
}, {
"type" : "WEB",
"url" : "https://github.com/go-gitea/gitea/releases"
}, {
"type" : "WEB",
"url" : "https://podalirius.net/articles/exploiting-cve-2020-14144-gitea-authenticated-remote-code-execution"
}, {
"type" : "WEB",
"url" : "https://www.exploit-db.com/exploits/49571"
}, {
"type" : "WEB",
"url" : "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"
}, {
"type" : "WEB",
"url" : "http://packetstormsecurity.com/files/162122/Gitea-Git-Hooks-Remote-Code-Execution.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-22T19:07:03Z",
"nvd_published_at" : "2020-10-16T14:15:11Z"
}
}