Sahih Muslim #4655 · The Book of Jihad and Expeditions

Sahih MuslimIt has been narrated on the authority of Aswad b. Qais who said
Sahih Muslim · Book 32 · The Book of Jihad and Expeditions
Sahih Muslim · كتاب 32 · كتاب الجهاد والسير
The Messenger of Allah (ﷺ) was in a cave (or raid) when his finger was hurt.
وَحَدَّثَنَاهُ أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، وَإِسْحَاقُ بْنُ إِبْرَاهِيمَ، جَمِيعًا عَنِ ابْنِ عُيَيْنَةَ، عَنِ الأَسْوَدِ بْنِ قَيْسٍ، بِهَذَا الإِسْنَادِ وَقَالَ كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم فِي غَارٍ فَنُكِبَتْ إِصْبَعُهُ ‏.‏
Reference : Sahih Muslim 4655In-book reference : Book 32, Hadith 137