Hilchos Lashon Hara chapter 6, section 9

These rules apply not only when a person speaks of someone doing a wronghood but also in other cases of lashon hara (such as shaming him with his forefathers’ deeds or lack of wisdom in Torah or worldly matters as explained in chapters 4 and 5). The rule is that whatever is forbidden to speak is forbidden to believe.