SQL Injection on █████
A parameter on an Airforce subdomain did not sanitise single quotes, allowing an attacker to inject SQL and extract database information such as the MySQL version, user, and database name. The report notes this is a regression of a previously fixed issue.
- Triaged in 4 days
- Fixed in 12 months
- Disclosed after 4.6 years
Background:
It looks like the patch for #231338 has been reverted and this subdomain is yet again vulnerable to SQL injection.
Summary:
An Airforce subdomain is vulnerable to SQL Injection because the application does not produce sufficient validation on user input. This allows an attacker to execute SQL queries.
Description:
The ███= parameter on https://███████/█████████ does not properly sanitize ' characters, allowing an attacker to execute SQL queries!
Impact
This could potentially expose sensitive information because an attacker could potentially dump the databases on this server!
Step-by-step Reproduction Instructions
1.) Open Firefox or any browser
2.) Visit `https://███████/██████████=' and updatexml(null,concat(0x0a,version()),null)-- [email protected]`
3.) You will see the MySQL version in the response => `██████████`
User - ███████
payload => https://████████/████████████=' and updatexml(null,concat(0x0a,user()),null)-- [email protected]
Database - ████
payload => https://██████/█████████████=%27%20and%20updatexml(null,concat(0x0a,database()),null)--%[email protected]
██████
Suggested Mitigation/Remediation Actions
Sanitize input!
Thanks!
- Corben Douglas @sxcurity
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 concatenated user input into SQL queries without parameterisation or escaping, and a previous fix was reverted.
Impact
This could potentially expose sensitive information because an attacker could potentially dump the databases on this server.
What the attacker needed
None
The fix
The application should sanitise user input.
How it was found
- Open a browser such as Firefox.
- Visit the vulnerable URL with a crafted parameter value containing a single quote and a database function.
- Observe the MySQL version in the response.
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 a website puts user input directly into a database command without cleaning it. Here, typing a single quote broke the command and let the attacker add extra database instructions. The attacker could then read private data from the database.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.