Hadithcore
Musnad Ahmad 1527
sahih· 1491

It was narrated from Yahya bin Sa"d, from Sa"d, that mention of the plague was made in the presence of the Messenger of Allah (ﷺ) and he said:

"It is a punishment that befell those who came before you. If it is present in a land, do not enter it, and if you are in a land where it is, do not leave."

References1 variant
Arabic/English book
Book 8, Hadith 1527