The Messenger of Allah ﷺ said, "May Allah curse the Jews and the Christians, for they took the graves of their prophets as places of worship."
حدثنا عثمان بن عمر حدثنا مالك عن الزهري عن سعيد
أن رسول الله ﷺ قال لعن الله اليهود والنصارى اتخذوا قبور أنبيائهم مساجد
Its isnad is sahih.