Sheikh `Umar al-Muqbil, professor at al-Imâm University
This depends on whether other people, aside from the speaker of course, will be able to figure out who is being spoken about or might become suspicious about certain people because of what the speaker is saying.
If there is no danger of anyone figuring out who is being spoken about, and if there is a genuine benefit from relating the matter – like setting a n example or conveying to people a valuable lesson, then it is permissible.
Due to the anonymity of the person being spoken about, there is no actual backbiting taking place.
The Prophet (peace be upon him) defined backbiting when he said: “Do you know what backbiting is?”
They said: “Allah and His Messenger know best.”
He said: “It is to mention about your brother something that he would dislike having mentioned about him.” [Sahîh Muslim (2589)]
The Prophet (peace be upon him) clearly specified: "your brother". This shows us that backbiting is an offense against a specific person. When the person being spoken about is truly anonymous, then there is no injured party.
Where the matter is so well-known that the identity of the person being spoken about will be easily recognized by the people who are listening, it will be unlawful to bring up the matter – even without directly mentioning the person's name – since the person being spoken against in this case is not truly anonymous.
In such a situation, the matter can only be brought up in those rare circumstances where Islamic Law allows a person out of necessity to speak badly about someone else.
And Allah knows best.
Source: Islam Today