The Prophet ﷺ mentioned the plague and said, "It is the remnant of a punishment or torment sent upon a group of the Children of Israil. So if it breaks out in a land while you are there, do not leave it, and if it breaks out in a land while you are not there, do not enter it."
حدثنا قتيبة حدثنا حماد بن زيد عن عمرو بن دينار عن عامر بن سعد
أن النبي ﷺ ذكر الطاعون فقال بقية رجز أو عذاب أرسل على طائفة من بني إسرائيل فإذا وقع بأرض وأنتم بها فلا تخرجوا منها وإذا وقع بأرض ولستم بها فلا تهبطوا عليها
Agreed upon (by Bukhari and Muslim). Muslim narrated it in the Book of Greetings, chapter on plague, bird omens, sorcery and the like, hadith no. 95/2218, from Qutayba, and Bukhari, hadith no. 6974, both from the hadith of Amir bin Saad, transmitted through him.Also narrated in this connection from Saad bin Abu Waqqas [Maani al-Athar 4/305], Khuzayma bin Thabit [Muslim, hadith no. 97/2218], Abdul-Rahman bin Awf [Bukhari, hadith no. 5730, and Muslim, hadith no. 2219], Jabir [Ahmad 3/324], and Ayesha [Bukhari, hadith no. 6619].