My first Critical on hackerone with a $6,400 bounty — SQL Injection
A parameter in a cloud subdomain endpoint was vulnerable to SQL injection, shown by a single quote causing a 500 error and confirmed with an automated tool. An attacker could manipulate SQL statements sent to the PostgreSQL database and change their logic.
Published on aryasec.medium.com
Hello everyone, introduce my name is Tengku Arya Saputra(Follow my Linkedin) on this occasion I will tell you how I found a security hole with a very critical vulnerability level on one of the bug bounty platforms HackerOne.
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 region parameter was concatenated into a database query without proper parameterisation or validation.
Impact
An attacker could change the logic of SQL statements run against the PostgreSQL database, though the report does not show data being read or altered.
What the attacker needed
A free account on the cloud subdomain; ability to intercept requests with a proxy
How it was found
- Visit the cloud subdomain and register an account with a HackerOne email address.
- Complete the information form and submit it while capturing traffic in a proxy.
- Find the endpoint with the level and region parameters and send it to the repeater.
- Add a single quote to the region parameter and observe the 500 internal server error.
- Use an automated SQL injection tool to confirm and identify the back-end database.
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 website often builds database queries from values you send it, such as a region name. If it pastes your value straight into the query without cleaning it, you can add database instructions of your own. This is called SQL injection, and it can let someone read or change data they should not touch.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.