Skip to content
XSS Write-up Advanced

Super Glamorous Recon with Intended Functionalities

A medium-privileged user could inject stored JavaScript into a custom login page, and by combining Smarty template features with DWR request tokens, steal a higher-privileged user's session and escalate to admin. The attacker could then make privileged requests as the victim.

hateshape Follow

Published on hateshape.github.io

Another night of sacrificed sleep yielded an interesting bug that I figured I would share (probably with myself, but I have made peace with that). I haven’t shared any blog posts with myself in some time (so let there be blog posts!

hateshape, on hateshape.github.io

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 allowed medium-privileged users to inject custom JavaScript into a shared login page, and the Smarty template engine exposed session cookies (including HttpOnly ones) to that JavaScript, while DWR tokens could be obtained via client-side scripts.

Impact

A medium-privileged user could escalate to admin by stealing a higher-privileged user's session, though the program decided not to fix the issue.

What the attacker needed

Medium-privileged account; victim visits crafted page; victim has higher privileges

How it was found

  1. A medium-privileged user creates a custom end user login page with the payload.
  2. A high-privileged user visits the stored payload, leaking their session data.
  3. The medium-privileged user harvests the leaked data from their logs.
  4. Using the session variables, the attacker makes privileged requests as the exploited user.

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.

A user with limited admin rights could add their own JavaScript to a login page that other users see. When a more powerful user visited that page, the script stole their session cookies and other tokens, letting the attacker act as that user. This is called stored cross-site scripting (XSS) combined with session hijacking.

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 hateshape

View all

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