Skip to content
CSRF Write-up Advanced

Escalating Low Severity Bugs To High Severity

The post describes techniques for chaining low-severity issues such as self-stored XSS, login/logout CSRF and OAuth connect CSRF into higher-impact attacks. An attacker could log a victim into the attacker's account, then use the attacker's own stored XSS to read the victim's sensitive pages via same-origin iframes, or link the victim's social account to the attacker's application account.

Rahul Maini Follow

Published on noob.ninja

July 20, 2018

Rahul Maini, on noob.ninja

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 lacked CSRF protection on login, logout and OAuth connect endpoints and allowed stored script in profile fields, so state-changing requests could be forged and same-origin frames read.

Impact

An attacker could read the victim's sensitive authenticated pages or link the victim's social account to the attacker's application account, then act on the victim's social media via stored tokens.

What the attacker needed

Victim logged in to the app; victim logged in to the social provider; attacker has stored XSS in profile; victim visits attacker page

The fix

The application should add CSRF protection to login, logout and OAuth connect endpoints, prevent linking an already-connected social account, and remove stored XSS from profile fields.

How it was found

  1. Victim visits the attacker's page.
  2. The page logs the victim out and logs them into the attacker's account using CSRF.
  3. Two iframes are created: one for the victim's sensitive page and one for the attacker's stored XSS page.
  4. The stored XSS in the attacker frame reads the victim frame's content because both share the same origin.
  5. The stolen data is sent to the attacker's server.

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 website can be tricked into logging you in as someone else (login CSRF) or logging you out (logout CSRF) because it does not check that the request really came from its own pages. If the attacker also has a stored cross-site scripting flaw (their own profile text runs as code), they can use it to read pages that only the logged-in victim should see. The post shows how combining these small flaws gives an attacker access to the victim's private data or social account.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

More by Rahul Maini

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.