Not ideal however routers are embedded systems. They should only be running code either produced or approved by the manufacturer which you'd hope isn't going to be setting about stack smashing. Outside shell code really shouldn't be running on them.
If any of them present a shell that's able to execute arbitrary code, however, that's quite a fail.