It has been narrated on the authority of Hafsa daughter of Sirin who said:
Anas b. Malik asked me the cause of death of Yahya b. 'Abu 'Amra. I said: (He died) of plague. He said: The Messenger of Allah (ﷺ) said that death by plague is martyrdom for a Muslim.
Reference: Sahih Muslim 1916 a In-book : Book 33, Hadith 239 USC-MSA web (English) : Book 20, Hadith 4709 (deprecated)
Help us gift a modern, ad-free Islamic application for the Muslim Ummah. Your donation will be recorded as Sadaqah Jariyah in your book of deeds, In Sha Allah.