Thanks for the question.
I would say that the matter is serious, because it generally is criminal even in civil law.
Therefore, if done with full knowledge and consent, it would be a mortal sin.
You can't accidentally hack in to an account (or happen upon it) without deliberately trying to hack into the account, so that generally makes it a full act of the will. The grey area is relative to the context of the action and full knowledge. If it were a boyfriend signing on to his girlfriends social media account to spy on her, that would have a lesser degree of seriousness than someone attempting to commit theft or fraud or some other malicious act.
God alone can judge the full culpability of such acts, but I would say it is likely mortal, unless it were done by some immature child (teen) who was not trying to do something vicious but was snooping out of some insecurity or other weakness. That does not excuse the act, but frames it more as juvenile than criminal.