Bypass PopUp Blocking via simulate click
Categories
(Firefox :: Security, defect, P1)
Tracking
()
People
(Reporter: guilhermeassmannn, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: csectype-dos, reporter-external, sec-low)
Attachments
(2 files, 2 obsolete files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36
Steps to reproduce:
- Go to https://jsfiddle.net/keer0k/bvyd2xfo/3/
- Run it
- Click in "click me"
- A new window will be open and, after a few seconds, more 2 windows will be opened too
Actual results:
3 windows are opening
Expected results:
only one window needs to open
Comment 1•5 years ago
|
||
Ok, yeah, this is pretty bad. Modifying your test case I can spawn an unlimited amount of popups with arbitrary delay and rhythm, DOSing the browser and heavily affecting the OS as well.
Baku, this should be fixed as of bug 675574, but apparently this presents a loophole. Do you have time to look into the bug or should we ask someone else?
Comment 2•5 years ago
|
||
Comment 3•5 years ago
|
||
Perhaps related to bug 1185052?
Comment 5•5 years ago
|
||
This is not related to the simulated click. The problem is this:
- the user clicks on the button. This button runs X times a function which (directly or indirectly) creates a timer.
- Now we have X timers, each one of them created by user-interaction.
- When those timers run, they are all allowed to open a window.
A simple version of that test is:
for (let i = 0; i < 3; i++) {
document.getElementById("button").addEventListener('click', () => {
setTimeout(() => window.open(location.href,"_blank","toolbar=yes,scrollbars=yes,resizable=yes,top=500,left=500,width=400,height=400"));
});
}
Updated•5 years ago
|
Comment 6•5 years ago
|
||
(In reply to Andrea Marchesini [:baku] from comment #5)
This is not related to the simulated click. The problem is this:
- the user clicks on the button. This button runs X times a function which (directly or indirectly) creates a timer.
- Now we have X timers, each one of them created by user-interaction.
- When those timers run, they are all allowed to open a window.
So in bug 675574 when you patched things to only allow 1 popup per event - is the event tracked on something other than the timer? Can we somehow refer back to this "original" event where we will have switched the blocked state to blocked?
Updated•5 years ago
|
Updated•5 years ago
|
Comment 7•5 years ago
|
||
Comment 8•5 years ago
|
||
Depends on D68590
Comment 9•5 years ago
|
||
Edgar, you may have an opinion on the approach here.
See the patch and my comment there.
Comment 12•4 years ago
|
||
What can we do to make progress here?
Comment 13•4 years ago
|
||
Baku isn't currently working on Gecko stuff AFAIK and I'm just recovering from leave. I'd be interested in following up to this but realistically I'll have to leave the needinfo open for a bit.
I'll also bring this up with Paul to see if he has any cycles to look at it.
Reporter | ||
Comment 14•4 years ago
|
||
is this report eligible for the bug bounty program in the category "Persistent-DOS of browser across restarts or a DOS requiring reboot of user’s computer"?
Reporter | ||
Comment 15•4 years ago
|
||
also, because this open other possibilities to exploit xss in SOME Attack scenarios
Reporter | ||
Updated•4 years ago
|
Updated•4 years ago
|
Comment 16•3 years ago
|
||
I think this is fixed now, maybe through the user activation changes in popup blocker?
Guilherme, in case you're still around, can you confirm whether this is still reproducible for you?
Updated•3 years ago
|
Comment hidden (obsolete) |
Comment 18•3 years ago
|
||
Oops, PEBKAC - looks like I had allowed popups for jsfiddle on my main profile. 😅
Guilherme, in case you're still around, can you confirm whether this is still reproducible for you?
So this question stands, then.
Comment 19•3 years ago
|
||
(In reply to Johann Hofmann [:johannh] from comment #16)
I think this is fixed now, maybe through the user activation changes in popup blocker?
Yeah, I think this might be fixed after the popup blocker partly adopt the user activation changes, I will double check again.
Comment 20•3 years ago
|
||
I think this is fixed after the popup blocker starts consuming the user activation while opening a popup.
Lets close this. Guilherme, feel free to reopen it or file a new bug if you still reproduce this.
Updated•1 year ago
|
Updated•8 months ago
|
Updated•8 months ago
|
Updated•8 months ago
|
Description
•