Skip to content
SQL injection Write-up Beginner

SQL Injection as a Feature

The application exposed a raw SQL query text box to users, allowing them to run arbitrary SQL against the database. An attacker could read, modify, or delete any data, as demonstrated by a user accidentally deleting a record.

idiallo.com

Published on idiallo.com

Looking at old applications, we always wonder who in their right mind thought of building them so badly. But every repository has its story and every effort has noble origins.

The author, on idiallo.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

The application directly executed user-supplied SQL queries without proper sanitisation or parameterisation, effectively turning a reporting feature into a SQL injection point.

Impact

An attacker could read, modify, or delete any data in the database, as shown by a user accidentally running a DELETE command that removed a record and disrupted the system.

What the attacker needed

Access to the service

The fix

The application should have used parameterised queries or a restricted reporting interface instead of allowing raw SQL input.

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.

This is a story about a feature that let people type SQL directly into a web page. SQL is the language used to talk to databases, and normally users should never be able to run their own commands. Because the page accepted raw SQL, anyone using it could see or change all the data in the database.

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.