Skip to content
XSS Write-up Beginner

How i got 300euro bounty?

A hidden parameter named 'code' was discovered on an OAuth redirect endpoint, and when supplied with a script payload it caused reflected cross-site scripting. An attacker could execute arbitrary JavaScript in a victim's browser in the context of the main domain.

doordiefordream Follow

Published on doordiefordream.medium.com

“https://doordie.com/o/oauth2/redirect”

DOD cyber solutions, on doordiefordream.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

Root cause

Likely the application reflected the value of the 'code' parameter into the HTML response without proper output encoding or sanitisation.

Impact

An attacker could execute arbitrary JavaScript in a victim's browser when the victim visits a crafted link, potentially leading to session theft or other client-side attacks.

What the attacker needed

Victim clicks a crafted link

How it was found

  1. Collect endpoints using a Chrome extension.
  2. Test each URL for sensitive or vulnerable endpoints for XSS.
  3. Find a URL that returns a blank page.
  4. Try open redirect and XSS without success.
  5. Fuzz for hidden parameters using Arjun and discover the 'code' parameter.
  6. Craft a URL with the 'code' parameter containing an XSS payload and trigger the alert.

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.

The website had a page that took a value from the web address and put it directly into the page without cleaning it. This let the researcher insert a small script that ran in the browser, which is called cross-site scripting (XSS).

What is XSS?

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

More by doordiefordream

View all

6 more disclosed reports, best first.

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.