File Upload blind SQLI
The file upload feature only validated the file extension, and the filename was inserted into a database query without sanitisation, allowing a blind time-based SQL injection. An attacker could confirm the vulnerability by observing delayed responses, though no data extraction was attempted.
This will be a short blog post and the first writing about Bug Bounties, I'm trying to get more involved into this matter and I'm hunting on my spare time and 90% of the time on Synack.
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
Impact
An attacker could confirm a blind SQL injection, potentially leading to data extraction, though the report only demonstrated time delays and did not extract data; the Cloudflare WAF initially blocked requests but was bypassed.
What the attacker needed
A free account; Cloudflare WAF bypass
The fix
The report states the bug was fixed.
How it was found
- Register a user account on the self-register page.
- Locate the file upload feature.
- Intercept the upload request with Burp Proxy.
- Replace the original filename parameter with a time-based SQL injection payload while keeping the .pdf extension.
- Bypass the Cloudflare WAF using a known configuration issue.
- Send requests with increasing sleep times and compare response times to confirm the injection.
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.
When you upload a file, the website may save the file's name into a database. If the website does not clean that name properly, an attacker can sneak in database commands. Here, the attacker used a technique that makes the database wait before answering, so they could tell the command worked by how long the site took to respond.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.