Kaab bin Ujra reported,

The Messenger of Allah ﷺ saw him while lice were falling onto his face and asked, "Are these vermin troubling you?"He replied, "Yes."So the Messenger of Allah ﷺ ordered him to shave his head. This took place at Hudaybiyyah, and it had not yet become clear to them that they would be released from their state of ihram there, since they were still hopeful of entering Mecca. Then Allah revealed the ruling on expiation, so the Messenger of Allah ﷺ commanded him to feed six poor people with a faraq of grain, or to sacrifice a sheep, or to fast three days.

Bukhari 1817

Sahih

حدثنا إسحاق حدثنا روح حدثنا شبل عن ابن أبي نجيح عن مجاهد قال حدثني عبد الرحمن بن أبي ليلى

عن كعب بن عجرة رضي الله عنه

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

البخاري 1817صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Confined person
Chapter
Sacrifice of a sheep
Numbering
Darussalam 1817
Bukhari 1817