Over the weekend a PlayStation 4 bug was discovered that caused systems to lock-up if successfully initiated. In a statement Sony says it is "aware" of the problem and are working on a fix.
PS4 owners discovered that a specific message, which if received, can cause systems to freeze forcing players to factory reset their consoles. No official reason was given but many suspect it's caused by a similar bug that crashed iPhones a couple years back.
In an update to VG247 Sony says, "We are aware of the situation and are planning a system software update to resolve this problem."
In the meantime players are setting their messages to private or friends-only to avoid getting the buggy message from strangers. To do so you must go to Settings>Account Management>Privacy Settings>Give your password>Personal Info>Messaging where you can change your message settings accordingly.