Skip to content
SQL injection Write-up Intermediate

Blind SQL Injection on Delete Request

A file-deletion request accepted a user-controlled parameter that was passed into a SQL query without proper handling, so a time-based blind SQL injection payload made the database pause. An attacker with a free account could use this to extract database contents, and the reporter used an automated tool to enumerate the available databases.

Jawad Mahdi Follow

Published on medium.com

Bounty$1,300 View original

Hi everyone, I am an Independent Cyber Security Researcher and a Red Team Member of SYNACK from Bangladesh.

Jawad Mahdi, on medium.com

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 delete endpoint concatenated a user-supplied parameter into a SQL query without parameterisation or validation.

Impact

An authenticated user could extract data from the backend database through the delete request, though the report only demonstrates database enumeration rather than full data theft.

What the attacker needed

A free user account; ability to create and delete a file

How it was found

  1. Create a free user account on the target domain.
  2. Create a file so there is something to delete.
  3. Send the delete request with a time-based blind SQL injection payload in a parameter.
  4. Observe the response delay of about five seconds, confirming the injection.
  5. Create another file and repeat, then capture the delete request and run an automated SQL injection tool against it.

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.

When you delete a file on a website, the site sends a request to the server telling it which file to remove. Here the server put part of that request straight into a database command, so a crafted value could make the database do something extra, like wait five seconds. That delay is a signal that the input reached the database, which lets an attacker ask yes/no questions and slowly read data.

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 Jawad Mahdi

View all

2 more disclosed reports, best first.

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.