CVE-2022-30781 in the critical feed json
Shell command injection in gitea
published 2022-05-16 4 y ago modified 2026-09-08 2 mo ago also BIT-gitea-2022-30781 , EUVD-2022-4684 , GHSA-p5f9-c9j9-g8qx , GO-2022-0450
- cvss
- 7.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 87.9%
- EPSS 87.9% chance of exploitation in 30 days, percentile 99.7%
- public exploits
- 2
- Metasploit, Exploit-DB
Summary
Gitea before 1.16.7 does not escape git fetch remote.
Patch / fix
- go code.gitea.io/gitea 1.16.7
- bitnami gitea 1.16.7
- gitea gitea 1.16.7
- gitea Alpine 3.24, Alpine 3.23, Alpine 3.22 +6 more 1.16.7-r0
alpine advisories ALPINE-CVE-2022-30781
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- github.com/go-gitea/gitea#19490 pull request
- github.com/go-gitea/gitea#19487 pull request
Timeline
- Published
- First public exploit (Metasploit exploit/multi/http/gitea_git_fetch_rce)
Exploit prediction
87.93% chance of exploitation in the next 30 days, higher than 99.7% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- Metasploit exploit/multi/http/gitea_git_fetch_rce Gitea Git Fetch Remote Code Execution metasploit exploit, excellent rank, 2022-05-16
- EDB-51009 Gitea 1.16.6 - Remote Code Execution (RCE) (Metasploit) webapps, 2022-09-15
- packetstormsecurity.com http://packetstormsecurity.com/files/168400/Gitea-1.16.6-Remote-Code-Execution.html referenced PoC, tagged "exploit" by a source, unverified
- packetstormsecurity.com http://packetstormsecurity.com/files/169928/Gitea-Git-Fetch-Remote-Code-Execution.html referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:N/I:P/A:N |
| OSV | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | code.gitea.io/gitea | <1.16.7 |
1.16.7 |
| bitnami | gitea | <1.16.7 |
1.16.7 |
Classification
- Weakness
-
- CWE-116 Improper Encoding or Escaping of Output
References
-
github.com
/go-gitea/gitea/pull/19490
web, patch, third-party-advisory, advisory
-
github.com
/go-gitea/gitea/pull/19487
web, patch, third-party-advisory, advisory
-
packetstormsecurity.com
/files/168400/Gitea-1.16.6-Remote-Code-Execution.html
web, exploit, third-party-advisory, vdb-entry, advisory
-
packetstormsecurity.com
/files/169928/Gitea-Git-Fetch-Remote-Code-Execution.html
web, exploit, third-party-advisory, vdb-entry, advisory
-
blog.gitea.io
/2022/05/gitea-1.16.7-is-released/
release-notes, vendor-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-30781
advisory, web
-
blog.gitea.io
/2022/05/gitea-1.16.7-is-released
web
-
github.com
/go-gitea/gitea
package
-
github.com
/advisories/GHSA-p5f9-c9j9-g8qx
advisory
Sources
- CVE List CVE-2022-30781
- GitHub Advisory GHSA-p5f9-c9j9-g8qx
- NVD CVE-2022-30781
- OSV BIT-gitea-2022-30781
- OSV GO-2022-0450
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.