GitHub Advisoryadvisory · npm

GHSA-fj93-7wm4-8x2g Cross-Site Scripting in jquery-mobile

HIGH Published 2020-09-02 Modified 2021-09-27 Official page ↗
Ecosystem
npm
Packages
jquery-mobile
Severity
High
Weaknesses
CWE-79
Reviewed
2020-08-31

Affected packages

• npm jquery-mobile: all versions (no fix yet)

Description

All version of `jquery-mobile` are vulnerable to Cross-Site Scripting. The package checks for content in `location.hash` and if a URL is found it does an XmlHttpRequest (XHR) to the URL and renders the response with `innerHTML`. It fails to validate the `Content-Type` of the response, allowing attackers to include malicious payloads as part of query parameters that are reflected back to the user. A response such as `{"q":"","results":[]}` would be parsed as HTML and the JavaScript payload executed. Recommendation No fix is currently available. Consider using an alternative package until a fix is made available.

Related

Weakness · CWE (1)

  • CWE-79 Improper Neutralization of Input During Web Page Generation weakness

References