Sahih Muslim Book 7, Hadith Number 2737.
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 Messenger of Allah (may peace be upon him) happened to pass by him during the period of Hudaibiya. Thereupon he (the Holy Prophet) said to him (Ka’b b. Ujra): Do these vermin’s trouble your head? He said: Yes. Thereupon he (the Holy Prophet) said: Shave your head. Then sacrifice a goat or observe fasts for three days or give three sits of dates to feed six needy persons.