Sefer Chofetz Chaim Hilchos Rechilus chapter 9 halachos 6-9

These slew of halachos are a recap with some added extra points of what we already know. In halacha 5 the Chofetz Chaim said that if two people, like witnesses tell an employer, for example, who will act on his own and fire the employee, if they tell him he is a thief, that is permissible assume they meet the 5 conditions because they are getting done what would most likely happen in court. However, this only means they don’t transgress the prohibition of speaking rechilus however they are helping the employer do a sin because he doesn’t have the right to act spontaneously and take matters into his own hands without investigating or taking his employee to court, so it’s better to say nothing to these type of people, or at least be extremely careful before talking up, besides the fact of meeting all these conditions to be allowed to speak is very slim as well.

Also, just telling a victim of how someone stole from him or hurt him, granted you might want to be quick to help the victim or make sure nothing worse happens to him, but you have to be very careful to meet all the conditions first before helping the guy and telling the victim who was the perpetrator in order to get his stolen goods back or paid up for damages caused to him. You should also rebuke the perpetrator first and if he does not listen and act to fix things on his own then you can tell the victim in the appropriate manner.

It makes no difference whether someone confronts you asking about what happened or if you voluntarily tell someone. If you meet all the conditions, it is permitted and a mitzvah to help him and if not then it is a sin. We see that Hashem didn’t even tell Yehoshua that Achan took the spoils of Ai, which put the entire Jewish nation into peril, until the lottery was cast Achan admitted himself of his wrongdoing because Hashem didn’t want to speak lashon hara since there was other means to reveal the wrongdoer.

Even if you aren’t telling the victims but just telling the story to other people it is only permissible if the 5 conditions of talking are met.