Mishkat al-Masabih 1770
وَعَنْ أَبِي هُرَيْرَةَ: أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسلم لعن زوارات الْقُبُورِ. رَوَاهُ أَحْمَدُ وَالتِّرْمِذِيُّ وَابْنُ مَاجَهْ وَقَالَ التِّرْمِذِيُّ هَذَا حَدِيثٌ حَسَنٌ صَحِيح وَقَالَ: قَدْ رَأَى بَعْضُ أَهْلِ الْعِلْمِ أَنَّ هَذَا كَانَ قبل أَن يرخص النَّبِي فِي زِيَارَةِ الْقُبُورِ فَلَمَّا رَخَّصَ دَخَلَ فِي رُخْصَتِهِ الرِّجَالُ وَالنِّسَاءُ. وَقَالَ بَعْضُهُمْ: إِنَّمَا كَرِهَ زِيَارَةَ الْقُبُورِ لِلنِّسَاءِ لِقِلَّةِ صَبْرِهِنَّ وَكَثْرَةِ جَزَعِهِنَّ. تمّ كَلَامه
From Abu Hurayrah: The Messenger of Allah ﷺ cursed the women who frequently visit graves. Reported by Ahmad, at-Tirmidhi and Ibn Majah. At-Tirmidhi said: "This is a hasan sahih hadith." And he said: "Some of the people of knowledge held that this was before the Prophet permitted visiting graves, and when he permitted it, men and women were included in his permission. Others said: He only disliked visiting graves for women because of their little patience and their great distress." End of his words.