Skip to content
XSS Write-up Intermediate

πŸ’₯ Mastering XSS: Unmasking Cross-Site Scripting Vulnerabilities Across a Bug Bounty Platform πŸ’₯

The application reflected user input in multiple contexts without proper encoding, and a WAF could be bypassed using alternative tags, event handlers, and encoding tricks. An attacker could execute JavaScript in victims' browsers, leading to session hijacking and account takeover.

~𝕐𝒂$𝖍 π•Šπ•–π•” Follow

Published on yashsec.medium.com

πŸ’₯ Mastering XSS: Unmasking Cross-Site Scripting Vulnerabilities Across a Bug Bounty Platform πŸ’₯

~𝕐𝒂$𝖍 π•Šπ•–π•”, on yashsec.medium.com

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

Impact

Attackers could steal session cookies leading to account takeover, impersonate users, inject malicious content, and potentially pivot to internal networks via blind XSS, though the text notes a WAF was present but bypassed.

What the attacker needed

Victim visits a crafted link or page; user input is reflected without proper encoding; WAF bypass techniques are needed

The fix

The platform fixed it by implementing context-aware output encoding, a strict Content Security Policy, and enhanced input validation.

How it was found

  1. Identify user-controlled input points such as search, profile fields, comments, and URL parameters.
  2. Test reflections with simple input to see how the application renders it.
  3. Observe that common payloads are blocked by the WAF, then try mixed-case, alternative tags, or encoding tricks.
  4. Inject a payload that breaks out of the current context (e.g., closing an attribute) and adds an executable element or event handler.
  5. For DOM-based XSS, craft a URL with a malicious fragment that the client-side script inserts into the page.
  6. Confirm execution and report the vulnerability.

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 when a website shows user input without cleaning it, so an attacker can sneak in code that runs in other people's browsers. Here, the site tried to block bad input with a firewall, but the attacker found ways around it, like using less common HTML tags or hiding the code with special characters. This let them steal login sessions or act as other users.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.