CVE-2021-45326 Cross Site Request Forgery in Gitea
Attackers can perform state-altering actions on behalf of authenticated users via CSRF in Gitea API routes.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2021-45326?
CVE-2021-45326 is a high-severity vulnerability in Gitea Gitea, published on 8 Feb 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
Cross Site Request Forgery (CSRF) vulnerability exists in Gitea before 1.5.2 via API routes.This can be dangerous especially with state altering POST requests.
Weakness: CWE-352
Which versions are affected by CVE-2021-45326?
4 open source packages ship an affected version, including github.com/go-gitea/gitea and gitea. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/go-gitea/gitea Go | All versions | 1.5.2 |
github.com/go-gitea/gitea Go | All versions | 1.5.2 |
github.com/go-gitea/gitea Go | All versions | 1.5.2 |
gitea Bitnami | All versions | 1.5.2 |
Products include Gitea Gitea.
How do I fix CVE-2021-45326?
Upgrade github.com/go-gitea/gitea to 1.5.2 or later.
Is CVE-2021-45326 being exploited?
There is no known exploitation of CVE-2021-45326 in the wild and no public exploit code.
Other vulnerabilities in Gitea Gitea
Sources
Also known as BIT-gitea-2021-45326, CLEANSTART-2025-GJ07641, GHSA-4wp3-8q92-mh8w, GO-2022-0309, UBUNTU-CVE-2021-45326.