We were with the Messenger of Allah ﷺ at Hudaybiyyah while we were in the state of ihram, and the polytheists had blocked our way. I had thick hair, and lice began falling onto my face. The Prophet ﷺ passed by me and asked, "Are the lice on your head bothering you?"I replied, "Yes."So he ordered him to shave his head. He said, then this verse was revealed, "And whoever among you is ill or has an ailment of the head must offer a ransom of fasting, charity, or sacrifice" [Baqarah 2:196].
حدثنا هشيم أخبرنا أبو بشر عن مجاهد عن عبد الرحمن بن أبي ليلى
كنا مع رسول الله ﷺ بالحديبية ونحن محرمون وقد حصرنا المشركون وكانت لي وفرة فجعلت الهوام تساقط على وجهي فمر بي النبي ﷺ فقال أيؤذيك هوام رأسك قلت نعم فأمره أن يحلق قال ونزلت هذه الآية {فمن كان منكم مريضا أو به أذى من رأسه ففدية من صيام أو صدقة أو نسك}
Its isnad is sahih. Its narrators are trustworthy and well-known, and Abu Bishr is Jafar bin Iyas, also known as Jafar bin Abu Wahshiya al-Yashkuri, a reliable and firmly established narrator, despite some weakness in his transmission from Mujahid, but this does not cause harm.Bukhari narrated the hadith with similar wording in 16/4, number 1816, Fath, in the chapter on the one prevented from completing Hajj. Muslim narrated it in 260/2, number 1201, in the book of Hajj. Abu Dawud narrated it in 2/172, number 1858. Ibn Majah narrated it in 2/1028, number 3079. Malik narrated it in 1/417, number 237. And Daraqutni narrated it in 298/2, number 279.