CVE-2022-42968 Gitea vulnerable to Argument Injection
Attackers can execute arbitrary commands via unsanitized git refs in Gitea, requiring an upgrade to secure the service.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-42968?
CVE-2022-42968 is a critical command injection vulnerability in Gitea Gitea, published on 16 Oct 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Gitea before 1.17.3 does not sanitize and escape refs in the git backend. Arguments to git commands are mishandled.
Weakness: CWE-88
Which versions are affected by CVE-2022-42968?
4 open source packages ship an affected version, including github.com/go-gitea/gitea, gitea and code.gitea.io/gitea. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/go-gitea/gitea Go | All versions | 1.17.3 |
github.com/go-gitea/gitea Go | All versions | 1.17.3 |
gitea Bitnami | All versions | 1.17.3 |
code.gitea.io/gitea Go | All versions | 1.17.3 |
Products include Gitea Gitea.
How do I fix CVE-2022-42968?
Upgrade github.com/go-gitea/gitea to 1.17.3 or later.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2022-42968 being exploited?
There is no known exploitation of CVE-2022-42968 in the wild and no public exploit code.
Other vulnerabilities in Gitea Gitea
- CVE-2026-60004 Gitea Code Injection
- CVE-2026-73278 Gitea WebAuthn bypass during OAuth and OIDC sign-in
- CVE-2026-94205 Gitea fork workflow approval bypass through maintainer-triggered events
- CVE-2021-45330 Improper Privilege Management in Gitea
- CVE-2021-45331 Reuse of one time passwords allowed in Gitea
Sources
Also known as BIT-gitea-2022-42968, CLEANSTART-2025-JO83815, GHSA-w8xw-7crf-h23x, GO-2022-1065.