It turns out every site uses jquery mobile with Open Redirect is vulnerable to XSS
jQuery Mobile fetches URLs from the location hash and inserts the response into the page via innerHTML, which can lead to XSS if an open redirect exists on the same origin. An attacker could exploit this to execute arbitrary JavaScript in the context of the vulnerable site.
Published on sirdarckcat.blogspot.com
jQuery Mobile is a cool jQuery UI system that makes building mobile apps easier. It does some part of what other frameworks like Ember and Angular do for routing.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
Any website using jQuery Mobile and having an open redirect is vulnerable to XSS, and even CSP with nonces may not prevent exploitation.
What the attacker needed
Site uses jQuery Mobile; site has an open redirect; victim clicks a crafted link
The fix
The jQuery Mobile team considers the open redirect to be the vulnerability and will not patch; they suggest blocking XHR requests that might redirect.
How it was found
- Put a URL in the location.hash that points to an open redirect on the same origin.
- The open redirect forwards to an attacker-controlled page containing malicious script.
- jQuery Mobile fetches the redirected URL and inserts the response into the page via innerHTML, executing the script.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
jQuery Mobile is a tool for building mobile websites. It takes whatever is after the # in the address bar, fetches that address, and puts the result directly into the page. If the site also has an open redirect (a link that can send you to any other site), an attacker can make the fetched address point to malicious code, which then runs in the victim's browser.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.