According to Islamic Law, there are certain matters which absolve a person from the sin of ghibah (backbiting), as follows:
First, complaining about oppression or injustice: It is lawful for an oppressed or wronged person to mention the evil things committed against him by one who has oppressed or wronged him, in the presence of someone who is supposed to bring him his right back.
Second, seeking others’ assistance for changing something wrong and bringing an oppressor back to the way of righteousness.
Third, seeking a Fatwa regarding a certain matter: However, it is recommendable for the person who wants to do so to use hints or indirect references when telling the Mufti about his legal opinion concerning “someone” who has wronged him.
Fourth, warning a Muslim against some evil: One, for example, is permitted to warn a pious person against some wicked or immoral person whom he visits frequently without knowing about his wickedness or immorality. This is also recommendable in consultation regarding matters such as marriage and entrusting money to people and the like. However, if the consulted person here has to warn against some evil, he must do so out of good advice, and not calumniation and slander.
Fifth, if a person is known with a special title such as “the lame” or “the bleary-eyed,” it is not an act of ghibah to call him as such. But, if he can be recognized with another means, it is preferable to use this means instead of calling him with such titles.
Sixth, if a person commits immoral and indecent acts in public and does not feel shy of doing so, it is not an act of ghibah to tell the others about these acts.
As for expiation for ghibah, it should be known that a backbiter commits two sins: one is violation of Allah’s right, as he has committed something that Allah has prohibited him to do; the expiation for this sin is repentance and regret. The other sin is committed against the honour of the backbitten person; if the latter has known about the backbiter’s act against him, he should ask him for forgiveness. It was reported on the authority of Abu Hurayrah (may Allah be pleased with him) that Allah’s Messenger (peace and blessings of Allah be upon him) said: “Whoever has wronged his brother with regard to wealth or honor, should ask for his pardon (before his death), before he pays for it (in the Hereafter) when he will have neither a Dinar nor a Dirham. (He should secure pardon in this life) before some of his good deeds are taken and paid to this (his brother), or (if he has no good deeds) some of the bad deeds of this (his brother) are taken to be loaded on him.” (Reported by Al-Bukhari and Muslim)
If, however, the person backbitten has not known about the backbiter’s act against him, the latter should keep beseeching Allah to forgive him (the backbitten person), so that he may not know about it and thus become angry with him (and that he himself may forgive him if he is to know about it).