Jami` at-Tirmidhi, Book 10, Hadith 92 (Tirmidhi 1058)

Abu Hurairah narrated:

"Indeed the Messenger of Allah cursed the women who visit the graves."