SQLi & XSS Vulnerabilities in a Popular Airlines Website!
The login page was vulnerable to SQL injection because user input was inserted into a raw SQL query without sanitisation, allowing an attacker to extract database information. A separate endpoint also reflected unsanitised input, leading to cross-site scripting.
blog.securitybreached.org
Published on blog.securitybreached.org
Hey Guys, Some of my friends was asking for another Writeup. so Here’s One :) Last month I decided to practice a little So I took one of the popular websites… Lets Take That Website as goodwesite.com (As Its Not a public Program) Lets start from a Little basics.
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 and reflected user input without encoding.
Impact
An attacker could extract database information including hashed passwords, and execute arbitrary JavaScript in a victim's browser via the XSS.
What the attacker needed
None
The fix
The vulnerabilities were fixed after being reported.
How it was found
- Intercept the login request and change the username to include a single quote.
- Forward the request and observe a database error in the response.
- Use an error-based SQL injection query to extract the database name.
- Send a POST request to the send.php endpoint with an XSS payload in the strSendMail parameter.
- Observe the script executing in the browser.
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.
SQL injection is when a website puts what you type directly into a database command, so special characters can change the command. Here, typing a quote in the login form caused a database error that revealed information. Cross-site scripting (XSS) is when a site shows your input without cleaning it, so a script you enter runs in other users' browsers.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.