وَعَنْ أَنَسٍ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «الْبُزَاقُ فِي الْمَسْجِد خَطِيئَة وكفارتها دَفنهَا»
Anas reported God’s Messenger as saying, “Spitting in the mosque is a sin which is expiated by burying the spittle.”
(Bukhari and Muslim.)