New Web Feature gone wrong | SQL-Injection
A newly added student eligibility form sent user input directly to a backend database without proper sanitisation, allowing blind SQL injection. An attacker could extract data from 71 databases, including student records, faculty details, user credentials, and admin login information.
medium.com
Published on medium.com
Last week, I was hunting on an education platform for a client. Like everyone else, I started with the basics: reconnaissance, discovery, information gathering, enumeration, and digging deep into the main domain and its subdomains.
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 application concatenated user input directly into SQL queries without parameterisation or proper input validation.
Impact
An attacker could extract sensitive data from 71 databases, including student records, faculty details, user credentials, and admin login information, potentially leading to a large-scale data breach.
What the attacker needed
Access to the public form; no authentication needed
The fix
The organisation acknowledged the issue and forwarded it to their security team for patching and mitigation, but the text does not confirm the fix was completed.
How it was found
- Visit the homepage and notice a new feature for students to enter personal details and exam marks.
- Submit random data and observe the response redirects to a page ending with thankyou.php.
- Use Burp Suite to analyse the request and see that user input is sent directly to the backend.
- Test for injection with crafted payloads and confirm blind SQL injection via true/false responses.
- Automate extraction with sqlmap, using random user agents to bypass a firewall that blocked initial attempts.
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.
SQL injection is when a website puts user input straight into a database command, so an attacker can sneak in extra commands. Here the input was used in a way that only returned true or false, so the attacker had to ask the database yes/no questions to slowly pull out data. The result was access to many databases full of sensitive information.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.