CVE-2026-20779 Gitea TOTP single-use enforcement defect allows OTP replay

High 7.1 Published Updated

Attackers can replay valid TOTP codes to bypass two-factor authentication and take over user accounts in Gitea.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-20779?

CVE-2026-20779 is a high-severity authentication bypass vulnerability in Gitea Open Source Git Server, published on 3 Jul 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Gitea versions from 1.5.0 before 1.26.3 have a TOTP single-use enforcement defect that allows a valid TOTP code to be accepted more than once across web two-factor authentication flows and the Basic Auth X-Gitea-OTP path.

Weakness: CWE-294

Which versions are affected by CVE-2026-20779?

3 open source packages ship an affected version, including code.gitea.io/gitea.

PackageAffectedFixed in
code.gitea.io/gitea GoFrom 1.5.01.26.3
code.gitea.io/gitea GoFrom 1.5.01.26.3
code.gitea.io/gitea GoFrom 1.5.01.26.3

How do I fix CVE-2026-20779?

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

Upgrade, and rotate credentials and sessions that may have been exposed. More about Authentication bypass.

Is CVE-2026-20779 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-20779 exists.

Sources

Also known as GHSA-gx3v-q759-g323, GO-2026-6057.

Is CVE-2026-20779 in your software?

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

Check your SBOMs for free