(10) باب جَوَازِ حَلْقِ الرَّأْسِ لِلْمُحْرِمِ إِذَا كَانَ بِهِ أَذًى وَوُجُوبِ الْفِدْيَةِ لِحَلْقِهِ وَبَيَانِ قَدْرِهَا
Ka`b b. 'Ujra (Allah be pleased with him) reported that the Messenger of Allah (ﷺ) happened to pass by him at Hudaibiya before entering Mecca in a state of Ihram and he (Ka'b) was kindling fire under the cooking pot and vermin were creeping on his (Ka`b's) face. Thereupon (the Holy Prophet) said:
Do these vermin trouble you? He (Ka'b) said: Yes. The Messenger of Allah (way peace be upon him) said: Shave your head and give some quantity of food enough to feed six needy persons (faraq is equal to three sa's), or observe fast for three days or offer sacrifice of a sacrificial animal. Ibn Najih (one of the narrators) said:" Or sacrifice a goat."
Reference: Sahih Muslim 1201 e
In-book reference: Book 15, Hadith 91
USC-MSA web (English) reference(deprecated numbering scheme): Book 7, Hadith 2736