Skip to content
XSS Write-up Beginner

XSS — Merry XSSMas

The author found a reflected cross-site scripting flaw where a script tag in a request was executed by the browser, and a stored cross-site scripting flaw where a script persisted and ran again on page reload. An attacker could run their own script in a victim's browser session.

medium.com

Published on medium.com

Started with a standard html script tag “<script>alert(‘Reflected XSS’)</script>”, this script tag tells the browser to stop reading text and start running instruction, we use this to know that we have control and there's a XSS vulnerability, and this script is temporary and happens only when you send the request.

ezemba fortune, on 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 inserted user-supplied input into HTML without encoding or sanitising it, so the browser executed it as script.

Impact

An attacker could run script in a victim's browser, and the stored variant could affect anyone who loads the page, though the text gives no further detail on what the script could do.

What the attacker needed

Ability to send crafted input to the site; victim loads the affected page

How it was found

  1. Send a request containing a script tag to the target.
  2. Observe that the browser executes the script, confirming reflected XSS.
  3. Submit a script that is saved by the application.
  4. Reload the page and see the script run again, confirming stored 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 when a website takes something a user typed or sent and puts it into a page without cleaning it, so the browser treats it as code instead of text. The author sent a small script in a request and the browser ran it, which shows the site trusted the input. A stored version means the script is saved on the site and runs again for anyone who loads that page.

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.