uxss on qrcode code reader (mozilla android version: 93.2.0 (Build #2015839747))
A QR code reader in Firefox for Android executed a javascript: URI when the user scanned a crafted QR code and approved the prompt, running script in the context of the page that was open. The reporter claims the confirmation dialog showed a misleading link, so the user could be tricked into running script that reads cookies.
- Fixed in 5 days
- Paid in 6 days
- Disclosed after 5 days
Created attachment 9246920
uxssmozilla.mpeg
hello i found uxss on qr code reader (mozilla android version: 93.2.0 (Build #2015839747), using the payload:
javascript:alert(document.cookie) // :<br>
https://www.google.com
the user will be confused because the link will be shown below ( on permit dialog show ). example "http://google.com". the user can see that the link is "https://google.com"
step to produced:
1. go to https://goqr.me (to create qr code).
2. insert text :
javascript:alert(document.cookie) // :<br>
https://www.google.com
3. the qr code will be created
4. open mozilla on android
5. go to https://google.com
6 . scan the qr code.
7. click permit, the user will be confused because the link will be shown below. example "http://google.com"
8. then the xss will be executed,
i attached the poc video file.
thank you
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the QR scanner passed scanned text straight to a web view or intent handler without restricting the javascript: scheme, and the confirmation dialog displayed a different URL than the one actually executed.
What the attacker needed
Victim scans a crafted QR code; victim accepts the prompt; a page is open in the browser
How it was found
- Create a QR code containing a javascript: URI followed by a real site address.
- Open Firefox on Android and browse to a normal site.
- Scan the crafted QR code with the built-in reader.
- Approve the prompt, which shows a misleading link.
- The script runs in the context of the open page.
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 report has not been written yet. The Original tab links to the source.
A QR code can hold a link, but it can also hold a 'javascript:' instruction that tells the browser to run code instead of opening a page. When the scanner offered to open it, the app ran that code inside the page the user already had open, so the code could read that site's cookies (small pieces of saved login data). The reporter says the confirmation box displayed a different, harmless-looking address, which made the trick easier to fall for.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.