CVE-2021-28378 Cross-site Scripting in Gitea

Low 3.7 Published Updated

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.

PackageAffectedFixed in
code.gitea.io/gitea GoAll versions1.13.4
code.gitea.io/gitea GoAll versions1.13.4
code.gitea.io/gitea GoAll versions1.13.4
gitea BitnamiFrom 1.12.01.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.

All Gitea Gitea vulnerabilities

Sources

Also known as BIT-gitea-2021-28378, CLEANSTART-2025-BP00020, GHSA-g95p-88p4-76cm, GO-2022-0832.

Is CVE-2021-28378 in your software?

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

Check your SBOMs for free