2FA Can Be Removed Without a Security Check #11882

Open
opened 2025-11-02 09:50:47 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @ZaxLofful on GitHub (Oct 19, 2023).

Description

A User is able to remove 2FA without an additional security check.

Standard practice here dictates that, if the user has 2FA already enabled; they should not be able to disable it without a 2FA check.

This would mean someone could have 2FA disabled, just by leaving their browser open for a few seconds.

This is for an admin account, in the event of a loss; recovery keys will need to be used.

Gitea Version

1.20

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Podman

Database

PostgreSQL

Originally created by @ZaxLofful on GitHub (Oct 19, 2023). ### Description A User is able to remove 2FA without an additional security check. Standard practice here dictates that, if the user has 2FA already enabled; they should not be able to disable it without a 2FA check. This would mean someone could have 2FA disabled, just by leaving their browser open for a few seconds. This is for an admin account, in the event of a loss; recovery keys will need to be used. ### Gitea Version 1.20 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? Podman ### Database PostgreSQL
GiteaMirror added the topic/securitytype/bug labels 2025-11-02 09:50:47 -06:00
Author
Owner

@codenoid commented on GitHub (Oct 23, 2023):

should it cofirm by entering the account password?

@codenoid commented on GitHub (Oct 23, 2023): should it cofirm by entering the account password?
Author
Owner

@lunny commented on GitHub (Oct 24, 2023):

I think when you login, you have been prompt 2FA? So the problem should be if 2FA enabled/disabled, all login sessions should be invalidated except current one.

@lunny commented on GitHub (Oct 24, 2023): I think when you login, you have been prompt 2FA? So the problem should be if 2FA enabled/disabled, all login sessions should be invalidated except current one.
Author
Owner

@ZaxLofful commented on GitHub (Nov 4, 2023):

Account password or a recovery code...

@ZaxLofful commented on GitHub (Nov 4, 2023): Account password or a recovery code...
Author
Owner

@shoce commented on GitHub (Sep 15, 2025):

i totally agree, disabling 2fa MUST require 2fa code or recovery code, not account password.

@shoce commented on GitHub (Sep 15, 2025): i totally agree, disabling 2fa MUST require 2fa code or recovery code, not account password.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11882