How I Became a University’s Worst Cybersecurity Nightmare And F
A university's student portal was vulnerable to SQL injection, and its React frontend exposed a hidden admin route and API responses that leaked user emails, roles, hashed passwords and password reset tokens. An attacker could use a leaked reset token to take over any user's account, including administrators.
It started like many recon missions — exploring domains, scanning subdomains, and testing login pages. Usually, you find one or two vulnerable components, maybe something overlooked.
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
Impact
An attacker could take over any user account, including administrative accounts, by using leaked reset tokens, and the exposure persisted across multiple API endpoints even after partial fixes.
What the attacker needed
Access to the public login page; a user account or email address to target; ability to read API responses
The fix
The application should have sanitised database input and removed sensitive fields such as reset tokens from all API responses, rather than patching individual endpoints.
How it was found
- Enter a single quote in the username field and observe a database error.
- Run sqlmap against the login form and confirm the Oracle database is injectable.
- Inspect the React app's readable source code and find a hidden /admin route.
- Set the auth cookie and JWT manually to reach the admin dashboard briefly.
- Observe API calls to /api/posts that include user email, role, hashed password and reset token.
- Trigger a password reset for a user, then visit the reset URL with the leaked token to take over the account.
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.
The login page let someone type a special character that made the database show an error, which is a sign that the input is being inserted directly into database commands. Separately, the website's code sent back extra private information about users, including a secret code meant for resetting passwords. Anyone who saw that secret code could reset the password and log in as that user.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.