CVE-2021-28378 Cross-site Scripting in Gitea
An attacker can inject malicious scripts via issue data in Gitea, potentially leading to session hijacking or code execution.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2021-28378?
CVE-2021-28378 is a low-severity cross-site scripting vulnerability in Gitea Gitea, published on 15 Mar 2021. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
Gitea 1.12.x and 1.13.x before 1.13.4 allows XSS via certain issue data in some situations.
Weakness: CWE-79
Which versions are affected by CVE-2021-28378?
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.13.4 |
code.gitea.io/gitea Go | All versions | 1.13.4 |
code.gitea.io/gitea Go | All versions | 1.13.4 |
gitea Bitnami | From 1.12.0 | 1.12.7, 1.13.4 |
Products include Gitea Gitea.
How do I fix CVE-2021-28378?
Upgrade code.gitea.io/gitea to 1.13.4 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2021-28378 being exploited?
There is no known exploitation of CVE-2021-28378 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Other vulnerabilities in Gitea Gitea
Sources
Also known as BIT-gitea-2021-28378, CLEANSTART-2025-BP00020, GHSA-g95p-88p4-76cm, GO-2022-0832.