Sunan an-Nasa'i, Volume 3, Book 21, Hadith 2048 (DarusSalam) ⓘ
It was narrated from Aishah that the Prophet said: "May Allah curse people who take the graves of their prophets as Masjids."
أَخْبَرَنَا عَمْرُو بْنُ عَلِيٍّ، حَدَّثَنَا خَالِدُ بْنُ الْحَارِثِ، قَالَ حَدَّثَنَا شُعْبَةُ، عَنْ قَتَادَةَ، عَنْ سَعِيدِ بْنِ الْمُسَيَّبِ، عَنْ عَائِشَةَ، أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ " لَعَنَ اللَّهُ قَوْمًا اتَّخَذُوا قُبُورَ أَنْبِيَائِهِمْ مَسَاجِدَ " .
also referenced under: Hadith 2046 (Reference) & Book 21, Hadith 230 (In-Book)