Anas bin Malik said to me, "What did Yahya bin Abu Amra die of?"I replied, "Of the plague."He said, "The Messenger of Allah ﷺ said, 'The plague is martyrdom for every Muslim.'"
قال لي أنس بر: بن مالك بم مات يحيى بن أبي عمرة؟ قالت: قلت: بالطاعون قالت: فقال: قال رسول الله: الطاعون شهادة لكل مسلم.
Bukhari narrated it in the Book of Medicine (5732), and Muslim in the Book of Leadership (1916), both through the route of Abdul-Wahid bin Ziyad, who said, Aasim narrated to us, from Hafsa bint Sirin, and he mentioned it.