How I Found 8 Vulnerabilities on an HP Student Portal
A student portal verified one-time passwords in client-side JavaScript rather than on the server, and had no brute-force protection on OTP validation. The author also found an IDOR where a phone number parameter returned other users' details, plus six further issues of mostly low severity.
Published on medium.com
I was studying for my Sem-Exam, a image was being circulated in my class group, it was about student offers and discounts on HP products, I didn’t think much of that as I was not looking for a Laptop.
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 OTP comparison was implemented in front-end JavaScript instead of server-side, and the data lookup trusted a caller-supplied phone number without checking who was asking.
Impact
An attacker could confirm an account without knowing the real OTP, brute-force OTPs freely, and retrieve other users' details from just a phone number; the author notes some of the other six issues were low severity.
What the attacker needed
A phone number of a target user; access to the public site
The fix
The site was taken down and later redirected elsewhere, so it appears the issues were not patched in place.
How it was found
- Open the registration page and view its page source.
- Notice that OTP confirmation happens in client-side code.
- Set a breakpoint on the OTP verification line and inspect the variable to read the correct OTP.
- Send a request using the Firebase configuration with a phone number as the parameter to retrieve account details.
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 the short code sent to your phone to prove it is you. Here the website checked that code inside the visitor's own browser instead of on its own computers, so anyone could read the correct code from the page and skip the check. Separately, a request that took a phone number returned account details for that number, so knowing someone's number was enough to see their data.
What is IDOR?
One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.