Kaab bin Ujra reported,

The Messenger of Allah ﷺ saw me with lice falling onto my face and asked, "Are these vermin troubling you?"I said, "Yes."He then ordered me to shave my head. They were at Hudaybiyyah at the time, and it had not yet been made clear to them that they would have to shave there, as they were still hoping to enter Mecca. So Allah revealed the ruling concerning the ransom, and the Messenger of Allah ﷺ ordered me to feed six poor people with a faraq of food, or to fast three days, or to slaughter a sheep.

Ahmad 18113

Sahih

حدثنا عبد الرزاق حدثنا معمر عن ابن أبي نجيح عن مجاهد عن عبد الرحمن بن أبي ليلى

عن كعب بن عجرة قال

رآني رسول الله ﷺ وقملي يتساقط على وجهي فقال أتؤذيك هوامك هذه قال قلت نعم قال فأمرني أن أحلق وهم بالحديبية ولم يبين لهم أنهم يحلقون بها وهم على طمع أن يدخلوا مكة فأنزل الله الفدية فأمرني رسول الله ﷺ أن أطعم فرقا بين ستة مساكين أو أصوم ثلاثة أيام أو أذبح شاة

أحمد 18113صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Kaab bin Ujra
Numbering
Darussalam 18113
Ahmad 18113