{"id":"GHSA-fj93-7wm4-8x2g","aliases":["GHSA-fj93-7wm4-8x2g"],"related":[],"kind":"vulnerability","state":"published","title":"Cross-Site Scripting in jquery-mobile","summary":"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\":\"<iframe/src='javascript:alert(1)'></iframe>\",\"results\":[]}` would be parsed as HTML and the JavaScript payload executed.\n\n\n## Recommendation\n\nNo fix is currently available. Consider using an alternative package until a fix is made available.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"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\":\"<iframe/src='javascript:alert(1)'></iframe>\",\"results\":[]}` would be parsed as HTML and the JavaScript payload executed.\n\n\n## Recommendation\n\nNo fix is currently available. Consider using an alternative package until a fix is made available.","format":"markdown","source":"ghsa"}],"published":"2020-09-02T21:22:47.000Z","modified":"2021-09-27T21:03:58.000Z","severity":{"scorer":"GitHub","scheme":"rating","rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"npm","package":"jquery-mobile","purl":"pkg:npm/jquery-mobile","source":"ghsa"}],"references":[{"url":"https://github.com/jquery/jquery-mobile/issues/8640","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/jquery/jquery-mobile/pull/8649","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/jquery/jquery-mobile/pull/8650","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/jquery/jquery-mobile/commit/b0d9cc758a48f13321750d7409fb7655dcdf2b50","tags":["web"],"sources":["ghsa"]},{"url":"https://gist.github.com/jupenur/e5d0c6f9b58aa81860bf74e010cf1685","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/jquery/jquery-mobile","tags":["web"],"sources":["ghsa"]},{"url":"https://snyk.io/vuln/SNYK-JS-JQUERYMOBILE-174599","tags":["web"],"sources":["ghsa"]},{"url":"https://www.npmjs.com/advisories/883","tags":["web"],"sources":["ghsa"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-fj93-7wm4-8x2g","url":"https://github.com/advisories/GHSA-fj93-7wm4-8x2g","licence":"CC-BY-4.0","modified":"2021-09-27T21:03:58.000Z"}],"updatedAt":"2026-11-25T22:56:45.274Z"}