The Messenger of Allah ﷺ said, "A man may speak a word, never imagining how far it will reach, and because of it he plunges into the Fire for a distance of seventy autumns."
قال حدثناه أسود بن عامر قال حدثنا جرير بن حازم عن الحسن
قال رسول الله ﷺ إن الرجل ليتكلم بالكلمة ما يرى أن تبلغ حيث بلغت يهوي بها في النار سبعين خريفا
Suyuti reported something similar with the wording, "A man may speak a word that pleases Allah, not realizing how far it will reach, and Allah will record for him His good pleasure because of it until the Day of Resurrection. And a man may speak a word that angers Allah, not realizing how far it will reach, and Allah will record against him His anger because of it until the Day of Resurrection." It was narrated by Malik, Tirmidhi, Nasai, Ibn Majah, and Ibn Hibban in his Sahih, and by Hakim, from Bilal bin Harith. Suyuti indicated that it is sahih.