All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Curse means being excluded from the Mercy of Allah. So, it is unlawful to curse anyone whom Allah has not cursed.
There is nothing in the Quran or the Sunnah that indicates that the one who masturbates is cursed. But the majority of the Muslim scholars believe that masturbation is forbidden and they count it among the sins that could be expiated by the prayer and Sadaqa (giving alms), unless the one who does it sticks to it, because that means a negligence of Islam and a venture to commit sins.
In that case, masturbation becomes a major sin which one must repent from.
Allah knows best.