How I Found Reflected Xss On A Webgis
A reflected XSS vulnerability existed in the search parameters of a WebGIS site, where user input was inserted directly into a JavaScript string inside a script tag. An attacker could inject code to execute arbitrary JavaScript in a victim's browser, and after a partial fix, a second parameter was found vulnerable.
In this write-up, I will share how I found a Reflected XSS vulnerability on a website that uses Geographic Information System (WebGIS).
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
Impact
An attacker could execute arbitrary JavaScript in a victim's browser, potentially leading to session hijacking or other client-side attacks, though the report only demonstrated an alert box.
What the attacker needed
Victim clicks a crafted link; no authentication needed
How it was found
- Visit the Artwork page and click Search without entering anything to see the URL parameters.
- View the page source and notice that parameter values are placed inside a JavaScript function in a script tag.
- Enter a crafted payload in the search bar to break out of the string and inject an alert.
- Observe the alert box confirming reflected XSS.
- After the initial fix filtered the apostrophe, use a different payload on the page parameter to bypass the filter and trigger an alert again.
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.
This website took text from the search box and put it straight into a piece of JavaScript code on the page without cleaning it. That let the tester type special characters that broke out of the code and ran their own script, which popped up an alert box. This kind of flaw is called reflected cross-site scripting (XSS) because the malicious input is echoed back in the response.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.