how to turn off private messaging? there is a vulnerability

 there seems to be a vulnerability that a user can get the private server IP by sending images in private messaging. we opened a ticket for this vulnerability but I want to turn off messaging in the meantime for all users in order to protect our systems and the users at the same time 

thank you