Every CVE Search/ Get API key

CVE-2022-30781

Shell command injection in gitea

7.5 HighPublic exploitFix available

Gitea before 1.16.7 does not escape git fetch remote.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
High
Availability
None

Exploit likelihood

87.9%Up 87.0 points since May 16, 2022
90%50%10%1%

What each source reports

NVD Score used 7.5

Gitea before 1.16.7 does not escape git fetch remote.

Record
CVE-2022-30781
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
CVSS 2.0
5.0 MediumAV:N/AC:L/Au:N/C:N/I:P/A:N
Weakness
CWE-116
Updated
2026-11-02
CVE List No score

Gitea before 1.16.7 does not escape git fetch remote.

Record
CVE-2022-30781
Updated
2026-11-02
EUVDEUVD-2022-4684 No score

Gitea before 1.16.7 does not escape git fetch remote.

Record
EUVD-2022-4684
Updated
2026-11-03
GitHub AdvisoriesGHSA-p5f9-c9j9-g8qx 7.5

Shell command injection in gitea

Gitea before 1.16.7 does not escape the shell out for git fetch remote allowing for shell command injection

Record
GHSA-p5f9-c9j9-g8qx
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Weakness
CWE-116
Updated
2026-11-02
OSVALPINE-CVE-2022-30781 7.5

Gitea before 1.16.7 does not escape git fetch remote.

Record
ALPINE-CVE-2022-30781
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Updated
2026-11-03
OSVGHSA-p5f9-c9j9-g8qx 7.5

Shell command injection in gitea

Gitea before 1.16.7 does not escape the shell out for git fetch remote allowing for shell command injection

Record
GHSA-p5f9-c9j9-g8qx
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Weakness
CWE-116
Updated
2026-11-02
OSVBIT-gitea-2022-30781 No score

Gitea before 1.16.7 does not escape git fetch remote.

Record
BIT-gitea-2022-30781
Updated
2026-11-02
OSV No score

Gitea before 1.16.7 does not escape git fetch remote.

Record
CVE-2022-30781
Updated
2026-11-02
OSVGO-2022-0450 No score

Shell command injection in gitea in code.gitea.io/gitea

Shell command injection in gitea in code.gitea.io/gitea

Record
GO-2022-0450
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
code.gitea.io/gitea
Go
before 1.16.7
1.16.7
gitea
Alpine:v3.16
before 1.16.7-r0
1.16.7-r0
gitea
Alpine:v3.17
before 1.16.7-r0
1.16.7-r0
gitea
Alpine:v3.18
before 1.16.7-r0
1.16.7-r0
gitea
Alpine:v3.19
before 1.16.7-r0
1.16.7-r0
gitea
Alpine:v3.20
before 1.16.7-r0
1.16.7-r0
gitea
Alpine:v3.21
before 1.16.7-r0
1.16.7-r0
gitea
Alpine:v3.22
before 1.16.7-r0
1.16.7-r0
gitea
Alpine:v3.23
before 1.16.7-r0
1.16.7-r0
gitea
Alpine:v3.24
before 1.16.7-r0
1.16.7-r0
gitea
Bitnami
before 1.16.7
1.16.7

Public exploits

Links only. Every CVE stores no exploit code.

Public exploits
SourceLinkDate
MetasploitGitea Git Fetch Remote Code Execution2022-05-16
PoC in GitHubwuhan005/CVE-2022-307812022-05-22
Exploit-DBGitea 1.16.6 - Remote Code Execution (RCE) (Metasploit)2022-09-15
PoC in GitHub403ArkhamS3c/cve-gitea2026-10-28

History

History
RecordedChangedSources
affected, aliases, exploits, referencesOSV
aliasesEUVD
first indexedCVE List, Exploit-DB, GitHub Advisories, Metasploit, NVD, OSV, PoC in GitHub

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2022-30781 is a high vulnerability (CVSS 7.5) in Gitea, published May 16, 2022. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 87.9%, the 99th percentile. Fixed in code.gitea.io/gitea 1.16.7.

References

Show 4 moreShow less
MoveEnter Open