CVE-2021-3382 Buffer Overflow in gitea

High 7.5 Published Updated

Remote attackers can crash the Gitea service via a stack buffer overflow triggered by malicious file paths.

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-3382?

CVE-2021-3382 is a high-severity memory corruption vulnerability in Gitea Gitea, published on 5 Feb 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Stack buffer overflow vulnerability in gitea 1.9.0 through 1.13.1 allows remote attackers to cause a denial of service (crash) via vectors related to a file path.

Weakness: CWE-787

Which versions are affected by CVE-2021-3382?

4 open source packages ship an affected version, including github.com/go-gitea/gitea, gitea and code.gitea.io/gitea. It affects 1 product.

PackageAffectedFixed in
github.com/go-gitea/gitea GoFrom 1.9.01.13.2
github.com/go-gitea/gitea GoFrom 1.9.01.13.2
gitea BitnamiFrom 1.9.01.13.2
code.gitea.io/gitea GoFrom 1.9.01.13.2

Products include Gitea Gitea.

How do I fix CVE-2021-3382?

Upgrade github.com/go-gitea/gitea to 1.13.2 or later.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2021-3382 being exploited?

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

All Gitea Gitea vulnerabilities

Sources

Also known as BIT-gitea-2021-3382, CLEANSTART-2025-DZ77580, GHSA-9f8c-pfvv-p4gm, GO-2024-2757.

Is CVE-2021-3382 in your software?

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

Check your SBOMs for free