How I Found Multiple XSS in Hidden Legacy Pages
The hunter discovered two reflected cross-site scripting vulnerabilities in hidden legacy pages found via robots.txt and JavaScript files. An attacker could execute arbitrary JavaScript in a victim's browser, potentially leading to session hijacking or other client-side attacks.
Published on marxchryz.medium.com
Hello everyone, I am Marx Chryz and I do bug bounty hunting for about a year now. It’s also been two and a half years since I started doing web penetration testing.
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 legacy pages failed to properly encode or sanitise user-supplied parameters before reflecting them in the response.
What the attacker needed
Victim clicks a crafted link; for one XSS, a logged-in session
How it was found
- Open the robots.txt file of the subdomain.
- Find a directory named 'web-app'.
- Guess random files under /web-app/ since it is blank.
- Access /web-app/dashboard.php which redirects to /web-app/logout.php.
- View the source and find many .js files containing URLs and parameters.
- Manually check all URLs and parameters for reflection, finding two reflected XSS.
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 shows user input without cleaning it, letting an attacker run their own JavaScript in a victim's browser. Here, the hunter found old forgotten pages that still reflected input, so an attacker could trick a user into clicking a crafted link and steal their session or perform actions as them.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.