CVE-2021-29134 Path Traversal in Gitea

Medium 5.3 Published Updated

An attacker can read arbitrary files on the server via directory traversal in the avatar middleware of 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-29134?

CVE-2021-29134 is a medium-severity path traversal vulnerability in Gitea Gitea, published on 15 Mar 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

The avatar middleware in Gitea before 1.13.6 allows Directory Traversal via a crafted URL.

Weakness: CWE-22

Which versions are affected by CVE-2021-29134?

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.6
code.gitea.io/gitea GoAll versions1.13.6
code.gitea.io/gitea GoAll versions1.13.6
gitea BitnamiAll versions1.13.6

Products include Gitea Gitea.

How do I fix CVE-2021-29134?

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

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

Is CVE-2021-29134 being exploited?

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

All Gitea Gitea vulnerabilities

Sources

Also known as BIT-gitea-2021-29134, CLEANSTART-2025-LJ89102, GHSA-h3q4-vmw4-cpr5, GO-2022-0353.

Is CVE-2021-29134 in your software?

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

Check your SBOMs for free