Sahih Muslim Book 7, Hadith Number 2736.
Chapter : It is permissible to shave the head in the state of Ihram if there is a trouble, and expiation becomes obligatory for shaving.
Ka’b b. ‘Ujra (Allah be pleased with him) reported that the Apostle of Allah (may peace be upon him) 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 virmins were creeping on his (Kalb’s) face. Thereupon (the Holy Prophet) said: Do these vermin’s 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.”