It looks like the PS4 is a currently a victim of a bug that will cause it to crash hard when it receives messages containing a string of specific characters. Some cases are so severe that a factory reset becomes necessary to stabilise the console once again.
And you don’t even have to open the message for it to happen like your conventional email-spread malware. Just getting a notification containing said string of characters is enough to have the entire PS4 system come crashing down. Deleting the message after it’s been received seem to do no good either.
The key to avoiding falling victim, though, seems simple enough. All it takes is to keep your messages is to set your messages to private, meaning you can either only receive messages from registered friends or no one at all.
If you’ve already gotten the message while your PS4 is turned off, the alternative method is to delete the message in question via the PlayStation app for Android or iOS.
Until Sony issues a fix, it’s not an overstatement to say that you need to take preventive steps to keep yourself safe. This is especially true if you play competitive games and have bad luck with people who take losses poorly or are just plain trolls.