From Critical to Low: 6 Vulnerabilities That Exposed a Web Applic
A search parameter was vulnerable to SQL injection, allowing an attacker to dump all database records. The same error also leaked server details, file paths, and an API token.
Published on medium.com
I recently started my journey into bug hunting. Initially, when I looked for targets on popular platforms like HackerOne, Bugcrowd, and YesWeHack, I struggled to find suitable websites to test.
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 application concatenated user input directly into SQL queries without proper sanitisation or parameterisation.
Impact
An attacker could retrieve all database records and also obtain sensitive information such as server version, file paths, and an API token.
What the attacker needed
None
How it was found
- Enter a single quote as the search keyword.
- Observe the verbose error message and leaked information.
- Modify the payload to inject a true condition.
- See all database records displayed on the search results page.
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 search box on a website was not handling special characters safely. When a tester typed a single quote, the site showed a big error and then, with a slightly different input, it showed all the data stored in its database. This happens when the website mixes user input directly into database commands.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.