{"id":"GHSA-fj93-7wm4-8x2g","summary":"Cross-Site Scripting in jquery-mobile","details":"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\":\"\u003ciframe/src='javascript:alert(1)'\u003e\u003c/iframe\u003e\",\"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.","modified":"2021-09-27T21:03:58Z","published":"2020-09-02T21:22:47Z","database_specific":{"github_reviewed_at":"2020-08-31T18:39:15Z","nvd_published_at":null,"cwe_ids":["CWE-79"],"severity":"HIGH","github_reviewed":true},"references":[{"type":"WEB","url":"https://github.com/jquery/jquery-mobile/issues/8640"},{"type":"WEB","url":"https://github.com/jquery/jquery-mobile/pull/8649"},{"type":"WEB","url":"https://github.com/jquery/jquery-mobile/pull/8650"},{"type":"WEB","url":"https://github.com/jquery/jquery-mobile/commit/b0d9cc758a48f13321750d7409fb7655dcdf2b50"},{"type":"WEB","url":"https://gist.github.com/jupenur/e5d0c6f9b58aa81860bf74e010cf1685"},{"type":"WEB","url":"https://github.com/jquery/jquery-mobile"},{"type":"WEB","url":"https://snyk.io/vuln/SNYK-JS-JQUERYMOBILE-174599"},{"type":"WEB","url":"https://www.npmjs.com/advisories/883"}],"affected":[{"package":{"name":"jquery-mobile","ecosystem":"npm","purl":"pkg:npm/jquery-mobile"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-fj93-7wm4-8x2g/GHSA-fj93-7wm4-8x2g.json"}}],"schema_version":"1.9.0"}