The Messenger of Allah ﷺ was in a cave when his finger was injured.
كان رسول الله ﷺ في غار، فنكبت إصبعه.
No references are available.
Muslim narrated it in the Book of Jihad (113:1796) through several routes from Ibn Uyayna, from Aswad bin Qays, from Jundab bin Abdullah, who mentioned it as above.The word "cave" here is a scribal error for "raider," as in the other narration, "he was present in some of the battles." See Bukhari (2802) and Muslim (112:1796), except that some scholars took "the cave" here to mean the Cave of Thawr, during the migration of the Prophet ﷺ from Makkah to Madinah.