Skip to content
XSS Write-up Intermediate

XSS Stored Bypass cookie http only via all accounts take over

A stored XSS vulnerability allowed attacker-controlled JavaScript to be saved and executed in other users' browsers. When the cookie was made HTTP-only, the attacker chained it with a DOM XSS to inject a fake login page on the university's domain and steal credentials.

VulnRAM Follow

Published on medium.com

With the collaboration of my team, we discovered and extracted this vulnerability.

Vuln_Ram, 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 failed to properly sanitise user input in a scientific research index field, allowing JavaScript to be stored and later executed, and also had a DOM XSS that allowed HTML injection.

Impact

An attacker could perform large-scale account takeover of student, staff, and faculty accounts by stealing credentials via a fake login page hosted on the university's domain; the HTTP-only cookie mitigation did not prevent this credential theft.

What the attacker needed

Victim visits a page with stored XSS; attacker can inject stored XSS; attacker can inject DOM XSS

How it was found

  1. Inject JavaScript into a field linked to the scientific research index to test for stored XSS.
  2. Observe that the injected script executes and is stored on the server and in the DOM.
  3. After the cookie was made HTTP-only, combine the stored XSS with a DOM XSS to inject HTML and JavaScript.
  4. Craft HTML that mimics the university login page and JavaScript that sends credentials to an external server.
  5. Inject the combined payload so that the fake login page is displayed on the university domain.
  6. When a victim enters credentials, they are sent to the attacker and the victim is redirected to the legitimate 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.

Stored XSS lets an attacker save malicious JavaScript on a website so it runs in other users' browsers. Here, the attacker used that to show a fake login form on the real university site, tricking users into typing their passwords.

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 VulnRAM

View all

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