Sahih Muslim
The Book of Jihad and Expedition (Kitab Al-Jihad wal-Siyar)
Book Number: 019 / Hadith Number: 4427
It has been narrated on the authority of Aswad b. Qais who said: The Messenger of Allah (may peace be upon him) was in a cave (or raid) when his finger was hurt.