Skip to content
SQL injection Write-up Intermediate

Blind SQL Injection in Private Program Leads to $2,100 Bounty

The id parameter of the ManageUser endpoint was inserted directly into a SQL query without sanitisation, so an attacker could inject SQL that made the database wait before responding. This confirmed a blind SQL injection that could allow extraction of database contents.

sachinaneja Follow

Published on medium.com

Injection vulnerabilities continue to be one of the most critical risks in web applications. In this blog post, I’ll share a Blind SQL Injection vulnerability identified in an Expense Management module during a bug bounty program, how it can be exploited, and how it can be mitigated.

Sachin Aneja, 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 id parameter was concatenated into a SQL query instead of being passed as a bound parameter.

Impact

An attacker could extract data from the database, enumerate its structure and potentially bypass authentication, though the text only demonstrates a timing delay.

What the attacker needed

A valid account, e.g. Administrator; access to the Expense Management module; a proxy tool to intercept requests

The fix

The id parameter should be handled with parameterised queries or prepared statements and validated strictly.

How it was found

  1. Log in to the application with a valid account.
  2. Navigate to Pay then Expense Management.
  3. Go to Users, select a user and intercept the ManageUser request with a proxy.
  4. Modify the id parameter to inject a time-delay payload.
  5. Increase the delay to 10 seconds, forward the request and observe the slower 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 write-up has not been written yet. The Original tab links to the source.

A blind SQL injection is when user input is put straight into a database command, but the site gives no error messages, so the attacker learns by timing how long the page takes to answer. Here, adding a database instruction that pauses made the response arrive later, proving the input reached the database. That means an attacker could ask the database questions one at a time and 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.

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.