Triple Xss In A Private Bug Bounty Program Via A Hidden Parameter
A hidden parameter 'p' was reflected unsanitised in three places on a page, allowing an attacker to inject a script that executes in the victim's browser. The attacker could steal cookies because the application lacked cookie protections.
Hi guys, recently I was hired by a company to conduct a private bug bounty on their platform and I managed to find an interesting XSS vulnerability on one of their pages.
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 failed to sanitise or encode user input from the hidden parameter before reflecting it into HTML and JavaScript contexts.
Impact
An attacker could execute arbitrary JavaScript in a victim's browser and steal cookies because the application had no cookie protections, though this might not work in some browsers due to protections.
What the attacker needed
Victim clicks a crafted link; hidden parameter 'p' is present
How it was found
- Use a tool to discover hidden parameters on the page.
- Confirm the hidden parameter with a second tool.
- Manually insert the parameter in the URL and inspect the page source to see where it is reflected.
- Craft a payload that escapes the three contexts and executes JavaScript.
- Observe the alert showing the domain name three times.
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 hidden parameter is a URL parameter that is not visible in the normal page but is still processed by the server. The page took the value of this parameter and inserted it into three different parts of the HTML without cleaning it, so a malicious script could run when someone visited a crafted link. This is called cross-site scripting (XSS), and it lets an attacker run code in the victim's browser.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.