And the difference is that instead of Microsoft, who take forever to update such security holes, Mozilla do it almost immediately.
No piece of software is 100% bug free and connecting to the internet always opens the possibility of being hacked in one way or another.