كتاب الْمَسَاجِدِ وَمَوَاضِعِ الصَّلاَةِ
5  
The Book of Mosques and Places of Prayer
(3)
Chapter: The prohibition of building masajid over graves and placing images therein; and the prohibition of taking graves as masajid
(3)
باب النَّهْيِ عَنْ بِنَاءِ الْمَسَاجِدِ عَلَى الْقُبُورِ وَاتِّخَاذِ الصُّوَرِ فِيهَا وَالنَّهْيِ عَنِ اتِّخَاذِ الْقُبُورِ مَسَاجِدَ
Sahih Muslim 530 a

Abu Huraira reported:

The Messenger of Allah (ﷺ) said: Let Allah destroy the Jews for they have taken the graves of their apostles as places of worship.
حَدَّثَنَا هَارُونُ بْنُ سَعِيدٍ الأَيْلِيُّ، حَدَّثَنَا ابْنُ وَهْبٍ، أَخْبَرَنِي يُونُسُ، وَمَالِكٌ، عَنِ ابْنِ شِهَابٍ، حَدَّثَنِي سَعِيدُ بْنُ الْمُسَيَّبِ، أَنَّ أَبَا هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ قَاتَلَ اللَّهُ الْيَهُودَ اتَّخَذُوا قُبُورَ أَنْبِيَائِهِمْ مَسَاجِدَ ‏"‏ ‏.‏
Reference : Sahih Muslim 530a
In-book reference : Book 5, Hadith 25
USC-MSA web (English) reference : Book 4, Hadith 1080
  (deprecated numbering scheme)