[Disclosure] Bypassing the fixed reflected XSS on👨⚕️ website
The website had a reflected cross-site scripting (XSS) vulnerability in a page parameter, and an initial fix that limited the parameter to four characters could be bypassed using HTTP parameter pollution. An attacker could execute arbitrary JavaScript in a victim's browser.
After we noted about a vulnerability disclosure program from BadApe NFT website (see http://blog.rehack.xyz/2022/06/disclosure-dom-based-xss-on-badape-nft.html), our team decided to poke around and see if there is any other Malaysian-based company that has the similar program on it.
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 properly sanitise or encode user input in the page parameter, and the initial fix only restricted the first parameter's length without handling duplicate parameters.
Impact
An attacker could execute arbitrary JavaScript in a victim's browser, potentially leading to session theft or other client-side attacks.
What the attacker needed
Victim clicks a crafted link
The fix
The issue was fixed by properly sanitising the input and handling duplicate parameters, as confirmed by the reporters.
How it was found
- Identify the page parameter on an endpoint as a reflection point.
- Insert an XSS payload into the page parameter and observe execution.
- After the fix limiting the parameter to four characters, append a second page parameter with the payload.
- Observe that the second parameter is still accepted and reflected, bypassing the fix.
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.
Cross-site scripting (XSS) is a flaw where a website inserts user input into its pages without proper cleaning, so an attacker can make the site run their own JavaScript. Here, the page parameter was not sanitised, so a crafted link could run code in the victim's browser. The first fix only allowed four characters, but the attacker added a second page parameter that was still accepted, bypassing the limit.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.