Skip to content
Account takeover Write-up Intermediate

From Misconfigured CloudFlare to Information Disclosure via Debug

A development environment exposed a debug mode on port 9000 that revealed a master OTP verification code. Using this code, the researchers could register and reset passwords for any account, leading to account takeover and limited admin dashboard access.

Fahad Alamrei Follow

Published on medium.com

During a bug hunting activity conducted by myself and YoKo Kho, we encountered a target in the form of a newly developed mobile application. In addition to focusing on testing the mobile application itself, another task we undertook during this phase was gathering information related to the domain/sub-domain…

Fahad Alamrei, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a debug endpoint exposed sensitive configuration including a static master OTP code that was reused across environments and accepted for any phone number.

Impact

An attacker could take over any account by knowing the phone number, and some accounts gave limited access to the admin dashboard; the development environment meant no real money was involved.

What the attacker needed

Knowledge of a victim's phone number; access to the exposed debug endpoint

The fix

The debug mode should be disabled in all environments, sensitive configuration should not be exposed, and OTP verification should not accept a static master code.

How it was found

  1. Find the development subdomain from the mobile app.
  2. Use Censys to find the real IP address behind Cloudflare.
  3. Scan open ports and discover debug mode on port 9000.
  4. Read the STAGE_VERIFICATION_CODE value from the debug page.
  5. Use that code during registration and password reset for any phone number.

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 write-up has not been written yet. The Original tab links to the source.

A debug mode is a feature left on by mistake that shows internal details. Here it exposed a secret code used to verify phone numbers during sign-up and password reset. Because the same code worked for every user, anyone who knew a phone number could take over that person's account.

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.

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.