CVE-2021-45330 Improper Privilege Management in Gitea

Critical 9.8 Published Updated

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.

PackageAffectedFixed in
code.gitea.io/gitea GoAll versions1.6.0
code.gitea.io/gitea GoAll versions1.6.0
code.gitea.io/gitea GoAll versions1.6.0
gitea BitnamiAll versions1.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.

All Gitea Gitea vulnerabilities

Sources

Also known as BIT-gitea-2021-45330, GHSA-pg38-r834-g45j, GO-2022-0982.

Is CVE-2021-45330 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free