On another platform, I recently wrote an article about managing people with difficult personalities. People with borderline or narcissistic personality disorder certainly fall into this category.
Usually, if possible, it's best to avoid interacting with someone who has this type of moral disorder. That's because lying and deceit are part of the picture. However, this isn't always possible. The person in question may be your boss or someone sitting in the next cubicle at work. Or, horror of horrors, your child's teacher may have strong narcissistic traits.
One of the tips in this article was never to agree with someone when they start complaining about another person. Trust me, sooner or later, this will happen. Usually, it's sooner, because morally disordered people are very unhappy, both with themselves and with others. They're always looking for the worst possible motives, and seizing upon people's faults, real or imagined.
So, when they start running someone down, remember they'll do the same thing to you when you're not around. They want to draw you into their drama, and they desperately want you to agree with them, that the person they are talking about is wicked and evil. Don't do it.
Aside from the fact you're participating in a mean-spirited activity, people with moral disorders like to sow discord. As crazy as it sounds, what usually happens is that the narcissist or borderline will run to the person she was speaking badly about, and tell that individual that YOU were saying terrible things about her, and that she felt she had to get this off her chest.
Then, when the other person responds in shock and anger, a malignant narcissist (or a borderline) will run right back to you with this information.