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.
Sahih Muslim Book 33, Hadith 239