# CVE-2022-30781: Shell command injection in gitea

- Severity: High 7.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 87.9%, higher than 99% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2022-05-16T00:00:00.000Z
- Modified: 2026-09-08T08:47:33.632Z
- Also known as: GHSA-p5f9-c9j9-g8qx, BIT-GITEA-2022-30781, GO-2022-0450
- Weaknesses: CWE-116
- Assigned by: mitre

## Description

Gitea before 1.16.7 does not escape git fetch remote.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- code.gitea.io/gitea (Go): before 1.16.7
- gitea gitea: before 1.16.7
- gitea (Bitnami): before 1.16.7

## Every score

- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:P/A:N`
- Bitnami Vulnerability Database: rating High

## References

- <http://packetstormsecurity.com/files/168400/Gitea-1.16.6-Remote-Code-Execution.html> (exploit, advisory, third-party-advisory, vdb-entry, web)
- <http://packetstormsecurity.com/files/169928/Gitea-Git-Fetch-Remote-Code-Execution.html> (exploit, advisory, third-party-advisory, vdb-entry, web)
- <https://github.com/go-gitea/gitea/pull/19490> (advisory, patch, third-party-advisory, web)
- <https://github.com/go-gitea/gitea/pull/19487> (advisory, patch, third-party-advisory, web)
- <https://blog.gitea.io/2022/05/gitea-1.16.7-is-released/> (advisory, release-notes, vendor-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-30781> (advisory, web)
- <https://blog.gitea.io/2022/05/gitea-1.16.7-is-released> (web)
- <https://github.com/go-gitea/gitea> (package)
- <https://github.com/advisories/GHSA-p5f9-c9j9-g8qx> (advisory)

## Sources

- CVE List: [CVE-2022-30781](https://www.cve.org/CVERecord?id=CVE-2022-30781), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-p5f9-c9j9-g8qx](https://github.com/advisories/GHSA-p5f9-c9j9-g8qx), CC-BY-4.0, modified 2024-08-21
- Go Vulnerability Database: [GO-2022-0450](https://pkg.go.dev/vuln/GO-2022-0450), CC-BY-4.0, modified 2026-03-03
- NVD: [CVE-2022-30781](https://nvd.nist.gov/vuln/detail/CVE-2022-30781), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-GITEA-2022-30781](https://osv.dev/vulnerability/BIT-GITEA-2022-30781), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2022-30781 · Whole record: https://cve.day/CVE-2022-30781.json · Rebuilt by cve.day 2026-11-25T22:58:11.719Z
