Bypassing University Email Verification: A Logical Flaw in a Saud
The registration flow for a university-restricted platform only checked the email domain in the browser, not on the server. An attacker could intercept the registration request, change the email to any address such as Gmail, and still receive an OTP and complete registration with student privileges.
Published on medium.com
While practicing basic web-security concepts, I explored the registration flow of a Saudi cybersecurity learning platform restricted to university students only. The system requires a verified .edu.sa university email before giving users access to student-only content.
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
The backend did not validate the email domain server-side and trusted the client-side restriction, also assigning student roles before verification.
Impact
Unauthorised users could register as students and gain free access to student-only learning materials, and the platform could not distinguish real students from outsiders.
What the attacker needed
A proxy tool to intercept requests; any external email address
The fix
The workflow should enforce server-side domain validation with a whitelist of approved .edu.sa domains, reject OTP requests for invalid domains, and assign roles only after verified email confirmation.
How it was found
- Start the registration flow and select a university.
- Intercept the registration request with a proxy tool.
- Modify the email in the JSON body to a non-university address.
- Submit the request; the backend sends an OTP to the external email.
- Complete registration and receive student privileges.
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.
When you sign up, your browser often checks things like whether your email ends in a university domain. But an attacker can use a tool to change the request before it reaches the server. Here, the server did not re-check the email domain, so anyone could register as a student.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.