Kaab bin Ujra reported,

The Messenger of Allah ﷺ said to him, "Perhaps the lice on your head are troubling you?"He replied, "Yes, Messenger of Allah."The Messenger of Allah ﷺ said, "Shave your head, and fast three days, or feed six poor people, or sacrifice a sheep."

Azami 4821

Sahih

عن كعب بن عجرة

أن رسول الله ﷺ قال له: لعلك آذاك هوامك؟ فقلت: نعم يا رسول الله، فقال رسول الله ﷺ: احلق رأسك، وصم ثلاثة أيام، أو أطعم سنة مساكين، أو انسك بشاة.

الأعظمي 4821صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Hajj
Chapter
What is permissible and what is forbidden for one in a state of ihram
Section
Permissibility of a pilgrim in ihram shaving his head if he has an ailment, with the obligation of fidya
Numbering
Jami al-Kamil 4821 (2nd edition)
Azami 4821