Sahih al-Bukhari 5703
Sahih al-Bukhari · Book 76: Medicine · To get one's head shaved because of some ailment
Narrated Ka`b bin Ujrah:
حَدَّثَنَا مُسَدَّدٌ ، حَدَّثَنَا حَمَّادٌ ، عَنْ أَيُّوبَ ، قَالَ سَمِعْتُ مُجَاهِدًا ، عَنِ ابْنِ أَبِي لَيْلَى ، عَنْ كَعْبٍ، هُوَ ابْنُ عُجْرَةَ قَالَ أَتَى عَلَىَّ النَّبِيُّ صلى الله عليه وسلم زَمَنَ الْحُدَيْبِيَةِ، وَأَنَا أُوقِدُ تَحْتَ بُرْمَةٍ، وَالْقَمْلُ يَتَنَاثَرُ عَنْ رَأْسِي فَقَالَ " أَيُؤْذِيكَ هَوَامُّكَ ". قُلْتُ نَعَمْ. قَالَ " فَاحْلِقْ وَصُمْ ثَلاَثَةَ أَيَّامٍ، أَوْ أَطْعِمْ سِتَّةً، أَوِ انْسُكْ نَسِيكَةً " . قَالَ أَيُّوبُ لاَ أَدْرِي بِأَيَّتِهِنَّ بَدَأَ .
The Prophet (ﷺ) came to me during the period of Al-Hudaibiya, while I was lighting fire underneath a cooking pot and lice were falling down my head. He said, "Do your lice hurt your?" I said, "Yes." He said, "Shave your head and fast for three days or feed six poor persons or slaughter a sheep as a sacrifice:"