Cross-Site Scripting in jquery-mobile
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.
Recommendation
No fix is currently available. Consider using an alternative package until a fix is made available.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | jquery-mobile | all versions | no fix |
References
- https://github.com/jquery/jquery-mobile/issues/8640
- https://github.com/jquery/jquery-mobile/pull/8649
- https://github.com/jquery/jquery-mobile/pull/8650
- https://github.com/jquery/jquery-mobile/commit/b0d9cc758a48f13321750d7409fb7655dcdf2b50
- https://gist.github.com/jupenur/e5d0c6f9b58aa81860bf74e010cf1685
- https://github.com/jquery/jquery-mobile
- https://snyk.io/vuln/SNYK-JS-JQUERYMOBILE-174599
- https://www.npmjs.com/advisories/883
- Weakness (CWE)
CWE-79- Platform
- npm
- Package
jquery-mobile- Disclosed
- 02.09.2020
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-fj93-7wm4-8x2g - CC BY 4.0
Vulnerability history: jquery-mobile
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
This is the only known vulnerability of this package.
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.