JavaScript Injection via Redirect Parameter on globe.gov Leading to Potential DOM XSS
A login redirect parameter on the globe.gov site was copied unsanitised into a global JavaScript variable used by the Liferay single-page application. The reporter says the value can later be run through eval, which would allow arbitrary script execution, but the demonstration only works when the victim pastes the payload into their own browser console.
Originally disclosed on Bugcrowd
- Accepted in 8 hours
- Disclosed after 16 days
Summary by National Aeronautics and Space Administration (NASA) - Vulnerability Disclosure Program
This only demonstrates a self XSS attack, as it requires the victim to the inject the payload themselves into the browser's console to trigger the payload.
Summary by RootVaibhav
A JavaScript injection vulnerability was discovered on https://www.globe.gov via the _com_liferay_login_web_portlet_LoginPortlet_redirect parameter. The value of this parameter is directly assigned to the global Liferay.SPA.loginRedirect variable without sanitization, introducing a client-side stored injection vector.
Although not executed immediately, this injected string remains accessible in the global scope and can be evaluated via eval(Liferay.SPA.loginRedirect) — a common pattern in Single Page Applications (SPAs) for dynamic routing or redirection logic. Once executed, it allows for arbitrary JavaScript execution, including the ability to load remote scripts (e.g., from Serveo/GitHub Pages), manipulate the DOM, and hijack session context.
This pattern introduces a dangerous XSS primitive with potential future exploitability, especially in SPAs where variables like loginRedirect may be consumed without re-validation. I have included a working PoC and video demo for reference.
Requesting disclosure consideration for educational and research transparency.
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 redirect parameter is written into a global JavaScript variable without validation, and the application later evaluates that variable with eval.
Impact
The reporter claims a dangerous XSS primitive with potential future exploitability, but the programme notes the demonstration only works as self-XSS when the victim injects the payload into their own console.
What the attacker needed
Victim pastes payload into own console
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.
A web page can store a value from the address bar in a JavaScript variable. If that stored value is later run as code, an attacker who controls the value can make the browser do things the site did not intend. Here the reporter only showed this by typing the code into the browser console themselves, so it is not yet proven that a normal link would trigger it.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.