Time-of-check Time-of-use (TOCTOU) Race Condition in Gitea - CVE-2026-20779
Published: June 22, 2026
Gitea
Detailed vulnerability description
The vulnerability allows a remote attacker to bypass one-time password replay protections and create multiple authenticated sessions.
The vulnerability exists due to a time-of-check time-of-use race condition in the web 2fa login and password-reset 2fa re-auth handlers when processing parallel submissions of the same totp passcode. A remote attacker can send parallel requests with the same captured passcode to bypass one-time password replay protections and create multiple authenticated sessions.
User interaction is required because the victim must complete a login flow that supplies a live totp value.