SQL Injections and the cute $2000 bounty
A request body parameter named query was placed directly into a SQL statement, and the resulting SQL was even echoed back in the response. The reporter could not read other tables because of organisational access limits, but confirmed a time-based SQL injection through a deliberate server delay.
Published on medium.com
Free Read here : Click here
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 query parameter was concatenated into a SQL statement without parameterisation, and the built statement was also returned to the client.
Impact
An attacker could inject SQL through the query parameter, but organisational-level access checks on the backend limited what data could be reached, so the confirmed impact was a time-based blind injection rather than direct data theft.
What the attacker needed
Access to the CRM application; ability to send crafted requests
How it was found
- Search the captured traffic for requests whose body contains the word query and narrow the results to a few requests.
- Send one of those requests and observe that the response contains the executed SQL statement.
- Insert a time-delay expression into the query value and send the request.
- Repeat with a larger delay value and confirm the response time grows accordingly.
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 SQL injection happens when a website builds a database command by gluing user input straight into it, so the input can change the command. Here the input was a value called query, and the server returned the finished database command in its reply, which showed the input was being inserted. The tester could not steal data, but made the database pause on purpose to prove the flaw was real.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.