Skip to content
CSRF Write-up Intermediate

Bug Bounty Adventures: A NodeBB 0-day

The single-sign-on module of NodeBB allowed an attacker to create an authorization code for their own account and then trick a victim into visiting a crafted URL, which associated the victim's account with the attacker's SSO identity. This could lead to account takeover, including of an administrator, without user interaction.

Marouane Mouhtadi Follow

Published on blogs.opera.com

In May 2021, we received a bug bounty submission from researcher Mar0uane, about a vulnerability in one of the forums we maintain, relating to an account-takeover vulnerability affecting the software’s single-sign-on module.

Marouane Mouhtadi (@Mar0_0uane), on blogs.opera.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 SSO callback endpoint did not require a state parameter or other CSRF protection, so an attacker could force a victim's browser to complete the account-linking flow with the attacker's authorization code.

Impact

The victim's account becomes associated with the attacker's SSO account, allowing the attacker to log in as the victim, and a foreign website could embed a frame to the URI so a logged-in user such as an administrator is compromised without their knowledge.

What the attacker needed

Attacker has an account; victim has an account; victim visits a crafted link or framed page

The fix

The vulnerability was fixed.

How it was found

  1. Create two accounts: one for the attacker and one for the victim.
  2. Sign in as the attacker and start enabling Google SSO.
  3. Intercept the request and capture the callback URI containing the authorization code.
  4. In a separate browser logged in as the victim, visit the captured URI.

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.

Single sign-on (SSO) lets you log in to a website using another service, like Google. The website should only link your account to an SSO identity after you confirm it. Here, an attacker could make the website link a victim's account to the attacker's SSO identity just by getting the victim to visit a special link, so the attacker could then log in as the victim.

What is CSRF?

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

More from Opera

View all

The newest disclosed reports for this program.

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.