Skip to content
XSS Advisory Beginner CVE-2024-30264

GHSL-2024-040: Cross-Site Scripting (XSS) in the sign-in page of typebot.io - CVE-2024-30264

The sign-in page of typebot.io took a redirectPath parameter from the URL and passed it to the router without validation. An attacker could craft a link with a javascript scheme in that parameter, and when a user clicked it, arbitrary JavaScript would run in the user's browser, potentially leading to account takeover.

Kwstubbs Follow

Originally disclosed on GitHub Security Lab

A reflected cross-site scripting (XSS) in the sign-in page of typebot.io may allow an attacker to hijack a user’s account.

Kwstubbs, 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

Root cause

The application passed the user-controlled redirectPath query parameter directly to the router's replace method without validating that it was a safe path, allowing a javascript: URL to execute.

Impact

This issue may lead to account takeover, as the attacker's JavaScript runs with the victim's privileges.

What the attacker needed

Victim clicks a crafted link; victim is signed in

The fix

The vulnerability was patched by the maintainers.

How it was found

  1. Craft a link to the sign-in page with a redirectPath parameter containing a javascript scheme.
  2. Send the link to a victim; when the victim clicks it and is authenticated, the router redirects to the javascript URL.
  3. The JavaScript runs in the context of the site's domain, allowing the attacker to load and execute further 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.

When you sign in to a website, it sometimes sends you to a page you asked for using a link parameter. Here, the site trusted that parameter completely and would run any code it contained. An attacker could send a link that, once clicked, runs their code as if it were the site itself, letting them act as the victim.

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 Kwstubbs

View all

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