I think the problem is not in the snippets but with the owner of the router.
If your router can be hacked by a stack snippet, it can also be hacked by a malicious banner ad or by any website for that matter. They could probably just paste the code in a JSFiddle and gain the same effect.
It would be a shame to limit this functionality just because some people might not have setup their routers properly. Especially from programmers, you would expect them to apply at least some basic level of home security.
One solution would be to limit access to the run button, but who are you protecting? Users with lots of rep would probably still press the Run button (I would).
Another option would be to limit the creation of stack snippets to users of a certain rep, but either that limit should be too high, or a hacker could easily gain that much rep. Also, they could just add the code to the question, and other users might just 'help' by converting it to a code snippet for them, without fully analysing the code (again, I would).
Scanning/checking the code might help a little, but it's probably impossible to fully analyse this kind of code automatically for such exploits. And still, JSFiddles and CodePens might also contain this code.
So in short, I'm afraid there is no proper solution on Stack Overflow's side that wouldn't limit the functionaltyfunctionality of this nice feature, and moreover I think it's just a patch giving a false sense of security, since the user would still be as vulnerable when visiting other websites.