The Prophet ﷺ said, "Beware of injustice, for injustice will be darkness on the Day of Resurrection before Allah. Beware of obscenity, for Allah does not love obscenity or vulgar speech. And beware of greed, for it destroyed those who came before you. It led them to violate what was sacred, to shed one another's blood, and to sever the ties of kinship."
حدثنا يحيى بن سعيد عن عبيد الله قال حدثني سعيد بن أبي سعيد
قال النبي ﷺ إياكم والظلم فإن الظلم ظلمات عند الله يوم القيامة وإياكم والفحش فإن الله لا يحب الفحش والتفحش وإياكم والشح فإنه دعا من قبلكم فاستحلوا محارمهم وسفكوا دماءهم وقطعوا أرحامهم
Its isnad is sahih. It was narrated by Abu Dawud 2/133 no. 1698 in zakat, in the chapter on stinginess, and Darimi 2/313 no. 2516 in righteousness, on the prohibition of wrongdoing, and Tayalisi 4/31 no. 2014, and Ibn Abu Shayba 9/97 no. 6658 in manners, and Hakim 1/11 and 415, who graded it sahih in the second location, and Dhahabi agreed with him, and Ibn Hibban 377 no. 1566, and Bayhaqi 10/243.