Sahih Muslim Book 7, Hadith Number 2734.

Chapter : It is permissible to shave the head in the state of Ihram if there is a trouble, and expiation becomes obligatory for shaving.

Kalb b. Ujra (Allah be pleased with him) reported: It was I for whom this verse was revealed (to the Holy Prophet): “Whoever among you is sick or has an ailment of the head, he (may effect) a compensation by lasting or alms or a sacrifice” He said: I came to him (the Holy Prophet) and he said: Come Dear. So I went near. He (again) said: Come near. So I went near. Thereupon the Messenger of Allah (may peace be upon him) said: Do the vermin’s trouble you? Ibn Aun (one of the narrators) said: I think he (Ka’b b. Ujra) replied in the affirmative. He (the Holy Prophet) then commanded to do compensation by fasting or by giving sadaqa (feeding six needy persons) or by sacrifice (of a animal) that is available.