Its chain of transmission is sound, as al-Mundhirī (1/118) states, and this report is further strengthened by the second route:
- Al-ʿAlāʾ ibn ʿAbd al-Raḥmān—through his father—from Abū Hurayrah , who said: The Prophet ﷺ missed a black woman who used to pick up scraps of cloth and sticks from the mosque. He asked, “Where is so-and-so?” They answered, “She has died,” … and he related the rest of the ḥadīth.
Al-Bayhaqī recorded it (2/440), and Ibn Khuzaymah likewise included it in his Ṣaḥīḥ through this route, as cited in Fatḥ al-Bārī, where he said:
“Al-Bayhaqī also transmitted it with a ḥasan isnād from Ibn Buraydah, from his father, in which he named her Umm Maḥjan and mentioned that the one who replied to the Prophet’s question was Abū Bakr al-Ṣiddīq. That version adds: ‘She was devoted to removing refuse from the mosque.’”
I add: The ḥadīth has also been reported from Abū Saʿīd al-Khudrī by Ibn Mājah, from Ibn ʿAbbās by al-Ṭabarānī, and as a mursal report from ʿUbayd ibn Marzūq by al-Iṣbahānī. All of these chains are weak, yet they all state unequivocally that the person concerned was a woman. Consult al-Targhīb if you wish. Al-Ḥāfiẓ commented:
“This ḥadīth teaches the merit of cleaning the mosque, of enquiring after a servant or friend when he is absent, of repaying kindness with supplication, and of encouraging attendance at the funerals of the righteous, and so on.”
He also said: “The Prophet ﷺ once saw phlegm on the qiblah wall of the mosque, and he became so angry that his face turned red. A woman of the Anṣār rose, scraped it away, and put perfume in its place. The Messenger of Allah ﷺ then said, ‘How excellent this is!’”