Skip to content
SQL injection Write-up Intermediate

From Recon to Report: Exploiting SQL Injection in Hidden Paramete

A hidden parameter in a subscription form was vulnerable to time-based SQL injection. An attacker could use it to extract database information such as the current user and database name.

Ahmad Mugh33ra Follow

Published on mugh33ra.medium.com

Hi 👋 My name is Ahmad Mugheera. I’m an ethical hacker, junior bug bounty hunter, and a computer scientist passionate about web security.💻

Ahmad Mugh33ra, on mugh33ra.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 hidden subscription_list parameter was concatenated into a SQL query without parameterisation or sanitisation.

Impact

An attacker could extract database information such as the current user and database name; the origin IP had no WAF or rate limits, making exploitation easier.

What the attacker needed

Access to the subscription form; ability to intercept HTTP requests

The fix

The report was accepted, but the text does not state that a fix was applied; the parameter should be handled with parameterised queries.

How it was found

  1. Fill the subscription form with dummy values and intercept the request.
  2. Notice the hidden subscription_list[] parameter.
  3. Test manually with common payloads, then scan with Acunetix.
  4. Confirm time-based SQLi manually using curl and observe a 6-second delay.
  5. Use Ghauri to extract the current user, database name, and banner.

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.

SQL injection is when user input is inserted into a database command without proper handling, letting an attacker change the command. Here, a hidden form field was not sanitised, so the attacker could make the database wait to confirm the injection and then pull out 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.

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.