SQL Injection in ████
The SSN field on a scholarship status page was vulnerable to SQL injection, allowing an attacker to log in as another person and view their scholarship status. The birth date field also appeared vulnerable, as malformed input caused a server error.
Originally disclosed on HackerOne
- Triaged in 2 hours
- Fixed in 6 months
- Disclosed after 10 months
Summary:
There is an SQL injection vulnerability in the SSN field at https://██████████/████/candidate_app/status_scholarship.aspx
Impact
An attacker could use this vulnerability to control the content in the database, exfiltrate information, and potentially obtain remote code execution.
Step-by-step Reproduction Instructions
Follow these steps:
- Visit https://███/███/candidate_app/status_scholarship.aspx
- Right click on the SSN field, click Inspect Element, and edit
maxlength="9"by changing it tomaxlength="9999"(or something similar, so that a longer payload can be put in) - Choose a random birth date, for example, January 1, 1990.
- Enter in your SQL injection payload into the SSN field. For example, try
' OR '1'='1. - Click "Check Status". Your SQLi payload will execute. If you did the example payload in step 4, assuming someone has the birth date you entered, it will log in as them and check their scholarship status.
Also, I didn't do much testing, but I think the birth date is also vulnerable to SQL injection. After sending the request, in the network tab, Edit and Resend Request after changing the birth day, month, or year to a payload that will cause invalid syntax like '. It will give you an HTTP 500 response. If you do a payload that won't cause invalid syntax like '', it will give you an HTTP 200.
Suggested Mitigation/Remediation Actions
Sanitize everything (use prepared statements) and validate the data.
Impact
An attacker could use this vulnerability to control the content in the database, exfiltrate information, and potentially obtain remote code execution.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application built SQL queries by concatenating user input instead of using parameterised queries.
Impact
An attacker could control database content, exfiltrate information, and potentially obtain remote code execution.
What the attacker needed
Victim's birth date known or guessed; web browser with developer tools
How it was found
- Visit the scholarship status page.
- Use the browser inspector to remove the length limit on the SSN field.
- Pick a birth date.
- Enter an SQL injection payload into the SSN field.
- Submit the form to execute the payload.
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 report has not been written yet. The Original tab links to the source.
SQL injection is when user input is inserted directly into a database command, letting an attacker change the command's meaning. Here, typing a special string into the SSN box could trick the site into showing someone else's scholarship details. The birth date box likely had the same flaw.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.