Skip to content
XSS Write-up Beginner

$1000 for a simple Stored XSS

A stored cross-site scripting vulnerability existed in a parameter that generated HTML pages, allowing an attacker to inject arbitrary JavaScript. Because the session cookie lacked the HttpOnly flag, the attacker could steal it and take over the victim's account.

snoopy Follow

Published on medium.com

Bounty$1,000 View original

I was hacking on a private program and I couldn't get anything interesting by fuzzing or using the website’s features.

snoopy, 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

Impact

An attacker could execute arbitrary JavaScript in a victim's browser and, because the session cookie was not HttpOnly, steal it to take over the victim's account.

What the attacker needed

Victim views the generated HTML page; session cookie lacks HttpOnly flag

How it was found

  1. Inspect JavaScript files to find a request that generates HTML pages with a parameter named transactionHtmlData.
  2. Send a request with HTML/JavaScript content in the transactionHtmlData parameter.
  3. Open the generated HTML file to trigger the injected script.
  4. Use JavaScript to read the session cookie (which lacked HttpOnly) and exfiltrate it.

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.

This report describes a stored cross-site scripting (XSS) bug. The website took a user-supplied value and inserted it directly into a new HTML page without cleaning it, so an attacker could put JavaScript code there. When a victim viewed that page, the code ran in their browser. The session cookie (a small piece of data that keeps you logged in) was not marked HttpOnly, meaning JavaScript could read it, so the attacker could steal it and log in 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 snoopy

View all

5 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.