Bypass configured 2FA provider with another provider that can be set up at login
Nextcloud 17 allowed users to set up additional two-factor providers at login, and a missing check meant that a user who had already configured one provider could reach the setup page for a different provider and complete login without using the enforced factor. An attacker with a victim's password could therefore bypass the second-factor protection.
Originally disclosed on HackerOne
- Triaged in under an hour
- Fixed in 6 hours
- Disclosed after 4 months
In Nextcloud 17 there is the possibility to set up 2FA providers at login. A missing check allows the following steps
- Enforce 2FA for all users
- As a user, configure a 2FA provider (via settings or at login)
- Log out
- Log in again (password only)
- When prompted with the earlier set up provider, go to /login/setupchallenge
- Set up another provider that hasn't been set up before
- You're logged in
Impact
Bypass a user's second-factor authentication protection.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the login flow did not check that the user was already enrolled in an enforced 2FA provider before allowing a new provider to be set up at login.
What the attacker needed
2FA enforced for all users; attacker knows the victim's password
How it was found
- Enforce 2FA for all users.
- As a user, configure a 2FA provider via settings or at login.
- Log out.
- Log in again with the password only.
- At the prompt for the earlier provider, go to the setup challenge page.
- Set up a different provider that was not configured before, which completes login.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Two-factor authentication (2FA) means logging in needs your password plus a second proof, such as a code from an app. Here the login page let someone add a brand-new second factor instead of proving the one already set up, so the extra protection could be skipped. Anyone who knew the password could get in.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.