Skip to content
XSS Advisory Intermediate

GHSL-2023-218_GHSL-2023-219: Cross-Site Scripting (XSS) in scrypted

Two reflected cross-site scripting vulnerabilities in scrypted allow an attacker to execute arbitrary JavaScript in a victim's browser by tricking them into clicking a crafted link. This could let the attacker impersonate any user, including an administrator, and potentially run arbitrary commands on the server.

Kwstubbs Follow

Originally disclosed on GitHub Security Lab

Two refelcted Cross-Site Scripting (XSS) vulnerabilities exist in scrypted that may allow an attacker to impersonate any user who clicks on specially crafted links. In the worst case, an attacker may be able to impersonate an administrator and run arbitrary commands.

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

Likely the application reflects user-controlled parameters into HTML or JavaScript without proper encoding or validation.

Impact

An attacker could impersonate any user, including an administrator, and potentially run arbitrary commands on the server, though the text hedges with 'may' and 'possibly'.

What the attacker needed

Victim clicks a link; victim is logged in (for issue 1); victim is not logged in (for issue 2)

The fix

The vulnerabilities were fixed in version 0.55.0 according to the advisory, but the text does not describe the fix; proper fix would be to encode output and validate redirect_uri.

How it was found

  1. Craft a URL with a malicious payload in the path that will be reflected when the endpoint is not found.
  2. Send the URL to a victim; when clicked, the payload executes in the victim's browser.
  3. The payload loads an external script that can make authenticated requests to the server.
  4. For the login page, craft a URL with a javascript: scheme in the redirect_uri parameter.
  5. Send the URL to a victim who is not logged in; after login, the JavaScript executes.

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.

Cross-site scripting (XSS) is a flaw where a website shows user-supplied text without cleaning it, so an attacker can sneak in code that runs in the victim's browser. Here, two places in the scrypted app reflect input back without proper filtering, letting an attacker run their own JavaScript if a user clicks a malicious link. That script can then act as the user, even an admin, and do things like run commands on the server.

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.