Misconfiguration Leads to P1 XSS
A parameter called elementsUrl on a target endpoint was used to load CSS and JavaScript from an attacker-controlled server, allowing script execution in the target's origin. The same vulnerable service was found on over 130 other subdomains, so the attacker could run script in each of those sites' contexts.
الح� دُ للهِ ح� دًا كثيرًا طيِّبًا � ُبارَكًا فيه � ُباركًا عليِه ك� ا يُحِبُّ ربُّنا ويرْضى.
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 elementsUrl parameter was passed to the page without validation, so the page loaded CSS and JavaScript from any host the attacker supplied.
Impact
An attacker could run script in the origin of the affected site, and the same flaw was found on more than 130 subdomains that use the service, so the impact could extend across all of them.
What the attacker needed
Victim visits a crafted URL; attacker hosts a server
How it was found
- Find the endpoint containing the elementsUrl parameter using crawling tools.
- Point elementsUrl at a server controlled by the attacker and observe DNS and HTTP requests arriving.
- Read the page source and see that it imports JavaScript and CSS from the external endpoint.
- Host a stylesheet and a script on the attacker server.
- Load the vulnerable URL with elementsUrl set to the attacker server and see the script run.
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 web page can pull in extra files, like stylesheets and scripts, from another website. If the page lets an attacker choose which website those files come from, the attacker can supply their own script, and the browser runs it as if it belonged to the real site. That lets the attacker act as the logged-in user on that site.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.