The Messenger of Allah ﷺ said, "The supplication of the wronged is answered, even if he is wicked, for his wickedness is upon himself."
حدثنا خلف قال حدثنا أبو معشر عن سعيد المقبري
قال رسول الله ﷺ دعوة المظلوم مستجابة وإن كان فاجرا ففجوره على نفسه
No references are available.
Tayalisi narrated it from Abu Hurairah, and Suyuti marked it in his Jami Saghir as sahih. But its chain is daif due to the weakness of Abu Mashar.