Sahih Muslim 1796
Sahih Muslim · Book 32: The Book of Jihad and Expeditions · The persecution suffered by the prophet (saws) at the hands of the idolaters and hypocrites
It has been narrated on the authority of Aswad b. Qais who said:
وَحَدَّثَنَاهُ أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ ، وَإِسْحَاقُ بْنُ إِبْرَاهِيمَ ، جَمِيعًا عَنِ ابْنِ عُيَيْنَةَ ، عَنِ الأَسْوَدِ بْنِ قَيْسٍ ، بِهَذَا الإِسْنَادِ وَقَالَ كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم فِي غَارٍ فَنُكِبَتْ إِصْبَعُهُ .
The Messenger of Allah (ﷺ) was in a cave (or raid) when his finger was hurt.