Hafetz Haim Halachot
Halacha 191 / 215

Hilchos Rechilus, chapter 8, section 5

A person must keep a secret that his friend told him privately, even if telling the secret would not be rechilus.

Telling a secret can harm its owner, and it goes against the wishes of the one who told it. It is also not modest behavior.