Moodle XSS on evolve.glovoapp.com
The redirect_uri parameter on a Moodle LTI authentication endpoint accepted a javascript: URI, allowing script execution in the victim's browser. An attacker could use this to steal session cookies and potentially take over accounts.
Originally disclosed on HackerOne
- Triaged in 23 hours
- Fixed in 27 days
- Disclosed after 27 days
**Cross Site Scripting (XSS) / Moodle XSS **
**Summary : ** *Cross-site scripting (XSS) is a type of computer security vulnerability typically found in web applications. XSS enables attackers to inject client-side scripts into web pages viewed by other users. A cross-site scripting vulnerability may be used by attackers to bypass access controls such as the same-origin policy. Cross-site scripting carried out on websites accounted for roughly 84% of all security vulnerabilities documented by Symantec as of 2007. *
An attacker can use XSS to send a malicious script to an unsuspecting user. The end user's browser has no way to know that the script should not be trusted and will execute the script. Because it thinks the script came from a trusted source, the malicious script can access any cookies, session tokens, or other sensitive information retained by the browser and used with that site. These scripts can even rewrite the content of the HTML page. For more details on the different types of XSS flaws, see: Types of Cross-Site Scripting.
**Payload : **javascript:alert(document.domain) **Vulnerable Param: ** ?redirect_uri=
Affected IP's : IP Address Port https://evolve.glovoapp.com/ 443
**Recommendations : ** Sanitize all the user inputs before executing them, also add XSS protection headers on server and client side.
References : https://www.acunetix.com/websitesecurity/cross-site-scripting/ https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet https://portswigger.net/web-security/cross-site-scripting
Proof of Concept :
** This XSS is escalated from Open-Redirect on the same Parameter ** ** Here is the POC for the open-redirect: **
Impact
Impact : *An Adversary can carry out XSS attack and also can take the cookie of the Admin and login through Admin Account. Also, an adversary can manage to login through any other users account with valid session cookies. *
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 failed to validate or sanitise the redirect_uri parameter, allowing a javascript: scheme to be used as a redirect target.
Impact
An attacker could execute script in a victim's browser to steal session cookies and potentially log in as the admin or other users.
What the attacker needed
Victim clicks a crafted link
The fix
The application should sanitise user inputs and add XSS protection headers on server and client side.
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 when a website takes input from a user and puts it into a page without cleaning it, so an attacker can make the site run their own JavaScript. Here, a parameter meant to hold a web address accepted a 'javascript:' link, which the browser then ran as code. That code could read the user's cookies, which are like temporary ID badges for a logged-in session.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.