Skip to content
XSS Advisory Beginner

GHSL-2020-155: Cross-Site Scripting (XSS) and Cross-Site Request Forgery (CSRF) in reactjs-ts-identityserver

The application is missing fixes for two known ASP.NET Core template vulnerabilities: an XSS in the authenticator setup page and a CSRF in the recovery code generation page. An attacker could trick a logged-in user into running script to elevate privileges, or into regenerating recovery codes to lock the user out of their account.

jarlob Follow

Originally disclosed on GitHub Security Lab

reactjs-ts-identityserver is vulnerable to Cross-Site Scripting (XSS) and Cross-Site Request Forgery (CSRF) that may lead to the elevation of privileges and per-user denial of service (DoS).

jarlob, on GitHub Security Lab

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 report has not been written yet. The Original tab links to the source.

How it worked

Impact

The XSS may lead to elevation of privileges, and the CSRF may cause a per-user denial of service by invalidating recovery codes, potentially locking the user out permanently.

What the attacker needed

Victim is logged in; victim clicks a malicious link; 2FA enabled for CSRF impact

The fix

The code should be modified according to the instructions in the referenced ASP.NET advisories.

How it was found

  1. Log in to the application.
  2. Visit the authenticator setup page with a crafted AuthenticatorUri parameter.
  3. Enter an invalid verification code to trigger the script.

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 report has not been written yet. The Original tab links to the source.

This app was built from an old template that had two known security bugs which were never patched. One bug lets an attacker put a script into a page the victim visits, so the script runs with the victim's permissions. The other lets an attacker make the victim's browser send a request that regenerates their backup login codes, which can lock them out.

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 jarlob

View all

192 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

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.