SQL Injection
A parameter on a staging image-rotation endpoint was passed into a SQL query without sanitisation, so boolean conditions in the value changed the response. An attacker could use true/false responses to extract database information one character at a time.
- Triaged in 2 hours
- Fixed in 3 months
- Disclosed after 3 months
https://staging.uzbey.com/rotate-image?fid=2841+and+substring(version(),1,1)=4 FALSE https://staging.uzbey.com/rotate-image?fid=2841+and+substring(version(),1,1)=5 TRUE
https://staging.uzbey.com/rotate-image?fid=2841+and+1=1+order+by+1-- TRUE https://staging.uzbey.com/rotate-image?fid=2841+and+1=1+order+by+2-- FALSE
FALSE = will redirect to access denied TRUE = redirected to page not found
fid must be a valid image id
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the fid parameter was concatenated into a SQL query without parameterisation or validation.
Impact
An attacker could infer database contents, such as the database version, through boolean responses, though the text does not show extraction of user data.
What the attacker needed
Access to the staging site; a valid image id
How it was found
- Send a request with a condition that should be false and observe the access denied redirect.
- Send a request with a condition that should be true and observe the page not found redirect.
- Use an ORDER BY clause with increasing numbers to find the column count.
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 report has not been written yet. The Original tab links to the source.
A web page took a number from the address bar and put it straight into a database question. By adding extra conditions to that number, the tester made the page behave differently depending on whether the condition was true, which lets someone slowly guess database contents. This is called SQL injection: sneaking database commands into ordinary input.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.