Even if the content of the leaks was fake, which we have no evidence to indicate and none of the key actors have really claimed (as opposed to the story about how they were obtained), it would still be legal to publish it because the public officials involved mean it has a clear public interest.
There’s the possibility of civil damages if it amounts to defamation, but that’s quite a standard to reach. Such damages would fall on the publisher of the story, the NY Post, but not a platform like Twitter (per section 230 safe harbor immunity). There is no legal gray area here.
This is the same reason why those who publicized the now widely rebuked Steele Dossier are not facing legal consequences for it (including Twitter), nor should they.
Of course your original comment said nothing about the accuracy of the reporting and instead only made the claim that there was a legal gray area around publishing hacked materials like these, which is simply not true.