Behind the Scenes: Discovering an OTP Leakage Bug in a Leading Broadband Services Website
The login portal performed OTP verification only in client-side JavaScript, and the server's HTTP response to the OTP request included the correct OTP and the registered mobile number. An attacker who knew a victim's username or mobile number could read the OTP from the response and log in without the victim's phone.
infosecwriteups.com
Published on infosecwriteups.com
When I recently relocated to a new city and rented a house, I was provided with Wi-Fi access that came with certain limitations, such as speed restrictions, device limits, and data usage caps. The property owner had partnered with a prominent broadband service provider, granting Wi-Fi access to all residents.
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 the server returned the generated OTP in the response and relied on client-side JavaScript to compare it, instead of validating the OTP server-side and never disclosing it.
Impact
An attacker who knows a resident's username or mobile number could obtain the OTP from the response and access that resident's portal account, including usage history and add-on management.
What the attacker needed
Knowledge of victim's username or mobile number; access to the portal login page
How it was found
- Open the management portal login page and review its source code.
- Find the checkOTP() function that compares the entered OTP with a server-generated value.
- Intercept the HTTP request sent when requesting or submitting the OTP.
- Inspect the HTTP response and observe the OTP and registered mobile number in the ret parameter.
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 one-time password (OTP) is a short code sent to your phone to prove it is you. Here, the website checked the code only in the browser, and the server also sent the correct code back in its reply, so anyone could read it and log in as another person.
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.