Short answer
Yes, a person who has been wronged may ask Allah for justice against the one who wronged him, and the Prophet ﷺ warned that the dua of the oppressed has no barrier before Allah. But you must not ask for more than the wrong done, and forgiving is better and more rewarded. Do not curse your own family, children or yourself.
Dua against a wrongdoer is permitted to the extent of the wrong and is not a sin. Exceeding it, praying for his death in disbelief or for harm to his innocent family, is haram. Forgiveness, or praying for his guidance, is more virtuous.
The four schools agree on this.
Explanation
Permission. Allah does not like evil to be spoken of openly, except by one who has been wronged (4:148). The Prophet ﷺ himself prayed against the leaders of Quraysh who had placed filth on his back while he prayed: "O Allah, deal with Quraysh." And when sending Mu'adh to Yemen he warned: fear the dua of the oppressed, for there is no barrier between it and Allah.
Limits:
- Match the wrong: the recompense for an evil is an evil like it (42:40). Ask Allah to return your right or to stop his harm, not to destroy his life for a small wrong.
- Not his family: pray against the wrong and the wrongdoer, not his innocent children.
- Not yourself or your own: the Prophet ﷺ said: do not pray against yourselves, your children or your wealth, in case it meets an hour when Allah answers.
- Check you were truly wronged: anger can make us feel oppressed when we are not.
The better path. The same ayah continues: whoever pardons and makes peace, his reward is with Allah (42:40), and whoever is patient and forgives, that is a matter of great resolve (42:43). Many of the righteous chose to say "Allah is enough for me" and leave it to Him, or to pray for the wrongdoer's guidance. Forgiving does not mean giving up legal rights: you can still use the courts or ask for your money back.
For the difference between dua against someone and cursing, see is it haram to curse someone. For hard times, see dua for hardship and dua for patience.
The evidence
Quran, Surah An-Nisaa 4:148
۞ لَّا يُحِبُّ ٱللَّهُ ٱلْجَهْرَ بِٱلسُّوٓءِ مِنَ ٱلْقَوْلِ إِلَّا مَن ظُلِمَ ۚ وَكَانَ ٱللَّهُ سَمِيعًا عَلِيمًا ﴿١٤٨﴾
Allah does not like the public mention of evil except by one who has been wronged. And ever is Allah Hearing and Knowing.
The wronged may speak and pray against the wrong.
Quran, Surah Ash-Shura 42:40
وَجَزَٰٓؤُا۟ سَيِّئَةٍۢ سَيِّئَةٌۭ مِّثْلُهَا ۖ فَمَنْ عَفَا وَأَصْلَحَ فَأَجْرُهُۥ عَلَى ٱللَّهِ ۚ إِنَّهُۥ لَا يُحِبُّ ٱلظَّٰلِمِينَ ﴿٤٠﴾
And the retribution for an evil act is an evil one like it, but whoever pardons and makes reconciliation - his reward is [due] from Allah. Indeed, He does not like wrongdoers.
No more than the wrong, and forgiveness is better.
Quran, Surah Ash-Shura 42:43
وَلَمَن صَبَرَ وَغَفَرَ إِنَّ ذَٰلِكَ لَمِنْ عَزْمِ ٱلْأُمُورِ ﴿٤٣﴾
And whoever is patient and forgives - indeed, that is of the matters [requiring] determination.
Patience and forgiveness are of great resolve.
Sahih al-Bukhari 1496
Sahih... واتق دعوة المظلوم فإنه ليس بينها وبين الله حجاب ...
"Fear the dua of the oppressed, for there is no barrier between it and Allah."
The dua of the wronged is answered.
Sahih al-Bukhari 240
Sahih... اللهم عليك بقريش ...
"O Allah, deal with Quraysh."
The Prophet ﷺ prayed against those who persecuted him.
Sunan Abi Dawud 1532
Grading to be checked... لا تدعوا على أنفسكم ولا تدعوا على أولادكم ...
"Do not pray against yourselves and do not pray against your children."
Cursing oneself and one's own family is forbidden.
Where the ruling is recorded
- al-Adhkar (al-Nawawi), Chapter on praying against one who wronged the Muslims or oneself. Permits dua against a wrongdoer and discusses its limits.
- al-Fatawa al-Hindiyya, Kitab al-Karahiyya, chapter on dua. Discusses what may and may not be asked for in dua.
Checked by our team. For a more accurate answer to your own situation, consult a scholar. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.