GHSA-fj93-7wm4-8x2g

Suggest an improvement
Source
https://github.com/advisories/GHSA-fj93-7wm4-8x2g
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-fj93-7wm4-8x2g/GHSA-fj93-7wm4-8x2g.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-fj93-7wm4-8x2g
Downstream
Published
2020-09-02T21:22:47Z
Modified
2021-09-27T21:03:58Z
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":"<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.

Database specific
{
    "cwe_ids":  [
        "CWE-79"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2020-08-31T18:39:15Z",
    "nvd_published_at":  null,
    "severity":  "HIGH"
}
References

Affected packages

npm / jquery-mobile

Package

Name
jquery-mobile
View open source insights on deps.dev
Purl
pkg:npm/jquery-mobile

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected

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"