CVE-2022-27313 Arbitrary file deletion in gitea

High 7.5 Published Updated

Attackers can delete critical configuration files in Gitea, leading to a Denial of Service condition.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-27313?

CVE-2022-27313 is a high-severity path traversal vulnerability in Gitea Gitea, published on 3 May 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

An arbitrary file deletion vulnerability in Gitea v1.16.3 allows attackers to cause a Denial of Service (DoS) via deleting the configuration file.

Which versions are affected by CVE-2022-27313?

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.16.4
code.gitea.io/gitea GoAll versions1.16.4
code.gitea.io/gitea GoAll versions1.16.4
gitea BitnamiFrom 1.16.31.16.4

Products include Gitea Gitea.

How do I fix CVE-2022-27313?

Upgrade code.gitea.io/gitea to 1.16.4 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2022-27313 being exploited?

There is no known exploitation of CVE-2022-27313 in the wild and no public exploit code.

All Gitea Gitea vulnerabilities

Sources

Also known as BIT-gitea-2022-27313, CLEANSTART-2025-IL34570, GHSA-g7p7-x6w7-w6qg, GO-2022-0442.

Is CVE-2022-27313 in your software?

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

Check your SBOMs for free