CVE-2021-45330 Improper Privilege Management in Gitea
Attackers can reuse valid server-side sessions after client-side cookie deletion, leading to privilege escalation and account takeover in Gitea.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-45330?
CVE-2021-45330 is a critical authentication bypass vulnerability in Gitea Gitea, published on 9 Feb 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
An issue exsits in Gitea through 1.15.7, which could let a malicious user gain privileges due to client side cookies not being deleted and the session remains valid on the server side for reuse.
Weakness: CWE-459
Which versions are affected by CVE-2021-45330?
4 open source packages ship an affected version, including code.gitea.io/gitea and gitea. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
code.gitea.io/gitea Go | All versions | 1.6.0 |
code.gitea.io/gitea Go | All versions | 1.6.0 |
code.gitea.io/gitea Go | All versions | 1.6.0 |
gitea Bitnami | All versions | 1.15.8 |
Products include Gitea Gitea.
How do I fix CVE-2021-45330?
Upgrade code.gitea.io/gitea to 1.6.0 or later.
Upgrade, and rotate credentials and sessions that may have been exposed. More about Authentication bypass.
Is CVE-2021-45330 being exploited?
There is no known exploitation of CVE-2021-45330 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-2022-42968 Gitea vulnerable to Argument Injection
- CVE-2021-45331 Reuse of one time passwords allowed in Gitea
Sources
Also known as BIT-gitea-2021-45330, GHSA-pg38-r834-g45j, GO-2022-0982.