The Book of Jihad and Expedition (Kitab Al-Jihad wa'l-Siyar)
Muslim :: Book 19 : Hadith 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.