Hafetz Haim Halachot
Halacha 50 / 215

Hilchos Lashon Hara, chapter 2, section 3

Some say this: if a person told lashon hara in front of three people, the speaker certainly broke the prohibition of lashon hara. But if one of the three then tells it to someone else, that person does not break the prohibition of lashon hara. Since three people know about it, it is as if the whole world knows.

This is only when that person mentioned it in passing. It does not apply if they meant to spread the story and shame the person more.

And even if the person does not say who told them, but just says, "This is what people are saying about so-and-so," they still break the prohibition of lashon hara.