Sahih al-Bukhari 1814
Sahih al-Bukhari · Book 27: Pilgrims Prevented from Completing the Pilgrimage · The Statement of Allah تعالى: "...And whosoever of you is ill or has an ailment in his scalp, (necessitating shaving), he must pay a Fidya (ransom), of either observing Saum (fasts) (three days), or giving Sadaqa (charity - feeding six poor persons), or offer sacrifice (one sheep)..." (V.2:196)
Narrated `Abdur-Rahman bin Abu Layla:
حَدَّثَنَا عَبْدُ اللَّهِ بْنُ يُوسُفَ ، أَخْبَرَنَا مَالِكٌ ، عَنْ حُمَيْدِ بْنِ قَيْسٍ ، عَنْ مُجَاهِدٍ ، عَنْ عَبْدِ الرَّحْمَنِ بْنِ أَبِي لَيْلَى ، عَنْ كَعْبِ بْنِ عُجْرَةَ ـ رضى الله عنه ـ عَنْ رَسُولِ اللَّهِ صلى الله عليه وسلم أَنَّهُ قَالَ " لَعَلَّكَ آذَاكَ هَوَامُّكَ ". قَالَ نَعَمْ يَا رَسُولَ اللَّهِ. فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " احْلِقْ رَأْسَكَ وَصُمْ ثَلاَثَةَ أَيَّامٍ، أَوْ أَطْعِمْ سِتَّةَ مَسَاكِينَ، أَوِ انْسُكْ بِشَاةٍ " .
Ka`b bin 'Ujra said that Allah's Messenger (ﷺ) said to him (Ka`b), "Perhaps your lice have troubled you?" Ka`b replied, "Yes! O Allah's Messenger (ﷺ)." Allah's Messenger (ﷺ) said, "Have your head shaved and then either fast three days or feed six poor persons or slaughter one sheep as a sacrifice."