ENOfficial
Ibn ‘Abbas said that God’s Messenger cursed women who visited graves, people who put mosques there and those who lit lamps there. Abu Dawud, Tirmidhi and Nasa’i transmitted it.
Source: sunnah.com
Other translations
Arabic
وَعَنِ ابْنِ عَبَّاسٍ رَضِيَ اللَّهُ عَنْهُمَا قَالَ: لَعَنَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ زَائِرَاتِ الْقُبُورِ وَالْمُتَّخِذِينَ عَلَيْهَا الْمَسَاجِدَ وَالسُّرُجَ. رَوَاهُ أَبُو دَاوُد وَالتِّرْمِذِيّ وَالنَّسَائِيّ
sunnah.com