Skip to content
XSS Write-up Intermediate

Day 2: Account Takeover via Stored XSS

A stored cross-site scripting (XSS) vulnerability in the email template system allowed an attacker to execute JavaScript when a manager viewed a sent email. The attacker used the XSS to steal the manager's CSRF token and create a new manager account, later escalating to admin.

danielbelay Follow

Published on medium.com

This write-up details how discovered a Stored Cross-Site Scripting (XSS) vulnerability on a recruiting website and escalated it to achieve account takeover. The platform had different roles such as Admin, Manager, and Staff.

dani3l, 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 escalate privileges by creating new manager or admin accounts, leading to full account takeover.

What the attacker needed

Attacker can create email templates; victim (manager) clicks a link in an email; attacker hosts an exploit script

How it was found

  1. Create an email template with a link containing a JavaScript payload.
  2. Send an email using the template to trigger the 'Echo Back' feature.
  3. The payload is reflected in the Activity section; clicking it executes the JavaScript.
  4. Host an exploit script that steals the CSRF token and creates a new user.
  5. Inject a link to the hosted script via the template and send it to a manager.
  6. When the manager clicks the link, the script runs, creating a new manager account.

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.

Stored XSS lets an attacker save malicious code (like JavaScript) in a website's data, which then runs in other users' browsers when they view that data. Here, the code ran when a manager clicked a link in an email template, allowing the attacker to act as the manager and create new accounts.

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 danielbelay

View all

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