Sahih al-Bukhari 1815
Narrated Ka'b bin 'Umra:
Allah's Apostle stood beside me at Al-Hudaibiya and the lice were falling from my head in great number. He asked me, "Have your lice troubled you?" I replied in the affirmative. He ordered me to get my head shaved. Ka'b added, "This Holy Verse:--'And if any of you is ill, or has ailment in his scalp (2.196), etc. was revealed regarding me. "The Prophet then ordered me either to fast three days, or to feed six poor persons with one Faraq (three Sas) (of dates), or to slaughter a sheep, etc (sacrifice) whatever was available.
حَدَّثَنَا أَبُو نُعَيْمٍ، حَدَّثَنَا سَيْفٌ، قَالَ حَدَّثَنِي مُجَاهِدٌ، قَالَ سَمِعْتُ عَبْدَ الرَّحْمَنِ بْنَ أَبِي لَيْلَى، أَنَّ كَعْبَ بْنَ عُجْرَةَ، حَدَّثَهُ قَالَ وَقَفَ عَلَىَّ رَسُولُ اللَّهِ ﷺ بِالْحُدَيْبِيَةِ، وَرَأْسِي يَتَهَافَتُ قَمْلاً فَقَالَ " يُؤْذِيكَ هَوَامُّكَ ". قُلْتُ نَعَمْ. قَالَ " فَاحْلِقْ رَأْسَكَ ـ أَوْ قَالَ ـ احْلِقْ ". قَالَ فِيَّ نَزَلَتْ هَذِهِ الآيَةُ {فَمَنْ كَانَ مِنْكُمْ مَرِيضًا أَوْ بِهِ أَذًى مِنْ رَأْسِهِ} إِلَى آخِرِهَا. فَقَالَ النَّبِيُّ ﷺ " صُمْ ثَلاَثَةَ أَيَّامٍ، أَوْ تَصَدَّقْ بِفَرَقٍ بَيْنَ سِتَّةٍ، أَوِ انْسُكْ بِمَا تَيَسَّرَ ".