The Messenger of Allah ﷺ said, "At the entrances of Madinah are angels. Neither Dajjal nor the plague will enter it."
حدثنا إسحاق بن عيسى أخبرني مالك عن نعيم بن عبد الله
قال رسول الله ﷺ على أنقاب المدينة ملائكة لا يدخلها الدجال ولا الطاعون
Its chain of transmission is sahih. Bukhari related it in 3/28, in the chapter on Umrah, "Dajjal does not enter Madinah," and Muslim in 2/1005, number 1379, in the chapter on Hajj, "The protection of Madinah from the entry of plague and Dajjal," and Malik in 892, in the Jami chapter, "What has been said about the pestilence of Madinah," all of them with his wording, from Abu Hurairah and Ibn Umar.