Sahih Muslim, Book 32, Hadith 137 (Muslim 4615)

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.