From “Website Not Accessible” to Critical Error-Based SQLi
A hidden ColdFusion endpoint on a legacy IIS/ASP.NET server accepted a 'name' parameter that was concatenated into a SQL query, causing database errors that disclosed the full query and allowed error-based SQL injection. An attacker could use crafted input to extract database version information and likely other data.
Most bug hunters skip domains that look locked down or inactive. This vulnerability came from doing the opposite.
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 built SQL queries by directly concatenating the user-supplied 'name' parameter without parameterisation or input validation.
Impact
An attacker could extract database version information and likely other data through error-based SQL injection, though the text does not show extraction beyond the version.
What the attacker needed
Reachable legacy ColdFusion endpoint; no authentication required
The fix
The endpoint should be fixed by using parameterised queries and suppressing detailed database errors from responses.
How it was found
- Fingerprint the backend as IIS, ASP.NET, ColdFusion on Windows Server.
- Try IIS short-name enumeration, which yields nothing useful.
- Use web archive sources to find a JavaScript file referencing three backend endpoints.
- Access /websnips/getItemImages.cfm, which returns JSON image paths and confirms the directory is live.
- Fuzz the /websnips/ directory and discover /websnips/vstats.cfm, which returns a ColdFusion error saying key [NAME] doesn't exist.
- Add the name parameter, observe a database error disclosing the full SQL query, then send a CAST expression to leak the database version.
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.
The website had an old hidden page that took a piece of text from the visitor and put it straight into a database command. By sending special text that made the database show an error, the tester could see secret information like the database version. This is called SQL injection: mixing user input with database instructions.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.