Skip to content
Account takeover Disclosed report Intermediate

2FA BYPASS

Cloudflare's dashboard allowed retrieval of 2FA recovery codes after only username and password verification, before the security key was used. An attacker with valid credentials could obtain recovery codes and bypass the second factor.

imtheking Follow

Originally disclosed on HackerOne

High 7.2 View original
  • Disclosed after 9 months

Summary by the program

Cloudflare's Dashboard enables users to configure 2-Factor Authentication using a Security Key. An issue in the authentication system allowed for the retrieval of recovery codes (used to regain account access if the security key is lost) after verifying the username and password but before completing the authentication process by touching the Security Key. Cloudflare's Engineering team resolved the issue by disallowing requests to the vulnerable API endpoint until users are fully authenticated.

Summary by the researcher

X tt

The original report as published on HackerOne, by imtheking. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 API endpoint that returns recovery codes did not check that the user had completed the second authentication factor.

Impact

An attacker who already had a victim's username and password could retrieve recovery codes and use them to bypass the security key, gaining account access.

What the attacker needed

Valid username and password; access to the recovery-code endpoint

The fix

The issue was fixed by blocking requests to the vulnerable API endpoint until users are fully authenticated.

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) adds a second step, like a physical security key, after your password. Recovery codes are backup codes to get back in if you lose that key. Here, the site handed out those backup codes before the second step was done, so someone who only knew the password could get them and skip the key.

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.

More by imtheking

View all

1 more disclosed report, best first.

More from Cloudflare Public Bug Bounty

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.