The Prophet ﷺ said, "When people see a wrongdoer and do not restrain him, Allah is about to envelop them all in punishment."Amr reported from Hushaym, "I heard the Messenger of Allah ﷺ say, 'There is no people among whom acts of disobedience are committed while they have the power to change them but do not, except that Allah is about to envelop them all in punishment from Him.'"
حدثنا وهب بن بقية عن خالد ح و حدثنا عمرو بن عون أخبرنا هشيم المعنى عن إسمعيل عن قيس قال قال أبو بكر بعد أن حمد الله وأثنى عليه يا أيها الناس إنكم تقرءون هذه الآية وتضعونها على غير مواضعها {عليكم أنفسكم لا يضركم من ضل إذا اهتديتم} قال
النبي ﷺ يقول إن الناس إذا رأوا الظالم فلم يأخذوا على يديه أوشك أن يعمهم الله بعقاب و قال عمرو عن هشيم وإني سمعت رسول الله ﷺ يقول ما من قوم يعمل فيهم بالمعاصي ثم يقدرون على أن يغيروا ثم لا يغيروا إلا يوشك أن يعمهم الله منه بعقاب
No references are available.
[Sahih] Recorded by Tirmidhi, Tafsir of the Quran, chapter on Surah Maidah, no. 3057, and Ibn Majah, no. 4005, from the hadith of Ismail bin Abu Khalid, through this route, and he explicitly stated hearing it directly in Ahmad, 5/1, and Tirmidhi said, hasan sahih.