Finding my First SQL Injection On HackerOne
A time-based SQL injection existed in the 'tag' parameter of a backend API used by a cultural events website. An attacker could inject SQL commands to cause time delays and potentially infer database information.
infosecwriteups.com
Published on infosecwriteups.com
SQL injections have been a persistent aspect of web application security, maintaining their position on OWASP’s top 10 vulnerabilities year after year. Like an old adversary that refuses to be defeated, they continue to emerge in modern applications despite decades of awareness and documentation.
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 'tag' parameter was concatenated directly into an SQL query without parameterisation or input validation.
Impact
An attacker could use time delays to infer database structure and potentially extract sensitive data, though the author was limited to time-based techniques and could not achieve broader access.
What the attacker needed
None
The fix
The vulnerability was fixed by the time of publication, though the exact fix is not described; it should be fixed by using parameterised queries.
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 directly into a database command, letting an attacker change what the command does. Here, a search parameter was not properly separated from the database query, so adding special characters could make the database wait before responding, which 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.