Hilchos Lashon Hara chapter 10, section 1
Suppose you saw someone wrong another person. For example, he stole from him, cheated him, or damaged his property. It does not matter whether the victim knows about it or not. Or he shamed him, hurt him with words, or embarrassed him.
If you clearly know that he did not return what he stole, did not pay for the damage, and did not ask forgiveness for the shame he caused, you may tell people about it. This is allowed even if you were the only one who saw it.
The purpose must be to help the person who was harmed, and to show people that such actions are wrong.
But you must be careful that seven conditions are met.