Reflected XSS in Hero Maps Premium WordPress Plugin (<= v.2.2.1)
2020-02-25
Background
The Hero Maps Premium plugin for WordPress was prone to multiple cross-site scripting vulnerabilities because it did not sufficiently sanitize user-supplied input. An attacker may leverage this issue to execute arbitrary JavaScript in the browser of an unsuspecting user in the context of the affected site. This may allow the attacker to steal cookie-based authentication credentials or launch other attacks. The issues were corrected and a patch was made available (v.2.2.3).
Download Link: Hero Maps Premium
Vulnerable versions: v.2.2.1 and prior.
Googledork: 'inurl:/wp-content/plugins/hmapsprem'
Vulnerability - Unauthenticated Reflected XSS (CVE-2019-19134)
Multiple reflected XSS vulnerabilities were identified in publicly-exposed endpoints of WordPress sites loaded with the Hero Maps Premium plugin. In each case, the application accepted input as HTTP parameters, which it later returned within the page as HTML or JavaScript. Multiple pages and parameters were susceptible to this attack.
Steps:
- Locate a WordPress instance with Hero Maps Premium (v.2.2.1 or prior) installed (hxxp://wordpress.example.com).
- Within a browser, navigate to the following URL: hxxp://wordpress.example.com/wp-content/plugins/hmapsprem/views/dashboard/index.php?p=/wp-content/plugins/hmapsprem/foo%22%3E%3Csvg//onload=%22alert(%27XSS%20in%20Hero%20Maps%20Premium%202.1.6%27)%22%3E
- Observe that the "p" parameter from the URL was passed directly into the page without sanitization - "><svg//onload="alert('XSS in Hero Maps Premium'). Observe that the SVG element is interpreted as a HTML element and that the associated JavaScript event handler executes within the context of the victim’s browser.
Testing Conditions:
- Firefox v73.0.1
- WordPress 5.2.1
The Hero Maps developer's professionalism and willingness to fix the issues were second to none. Upon notification, they worked to fully resolve the XSS issues and protect the Hero Maps users.