Skip to content

Cross-Site Scripting in jquery-mobile

High severity GitHub Reviewed Published Sep 2, 2020 to the GitHub Advisory Database • Updated Jan 9, 2023

Package

npm jquery-mobile (npm)

Affected versions

>= 0

Patched versions

None

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":"<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.

References

Reviewed Aug 31, 2020
Published to the GitHub Advisory Database Sep 2, 2020
Last updated Jan 9, 2023

Severity

High

Weaknesses

CVE ID

No known CVE

GHSA ID

GHSA-fj93-7wm4-8x2g

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.