Skip to content
XSS Write-up Beginner

Reflected XSS Leading to Account Takeover

A reflected cross-site scripting vulnerability was found in the search query parameter, allowing an attacker to inject JavaScript that executes in a victim's browser. The attacker could redirect users to a malicious site to steal session cookies, potentially leading to account takeover.

0onoproblem Follow

Published on 0onoproblem.medium.com

I’m 0oNoProblem (pronounced “Zero o NoProblem”, you can call me No or Nopr). I recently discovered my first bug, a reflected Cross-Site Scripting (XSS) vulnerability.

0_oNoProblem, on 0onoproblem.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 search query parameter is reflected into the page without proper output encoding or sanitisation, allowing script injection.

Impact

An attacker could redirect users to a malicious site to steal cookies, potentially leading to account takeover, though the report does not demonstrate actual cookie theft.

What the attacker needed

Victim clicks a crafted link

How it was found

  1. Navigate to the search page with a query parameter.
  2. Insert a JavaScript payload into the query parameter.
  3. The payload redirects the user to an attacker-controlled site.

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 search box echoed back whatever was typed, including code, so a crafted link could run a script in the victim's browser. That script could then send the victim's login cookies to the attacker, letting the attacker act as the victim.

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 0onoproblem

View all

1 more disclosed report, 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.