Riyad as-Salihin, Book 18, Hadith 1693 (In-Book)

Anas bin Malik (May Allah be pleased with him) said: The Messenger of Allah said, "Spitting in the mosque is a sin, and its expiation is that the spittle should be buried in earth."[Al-Bukhari and Muslim].

عن أنس رضي الله عنه أن رسول الله صلى الله عليه وسلم ‏:‏ ‏ "‏البصاق في المسجد خطيئة، وكفارتها دفنها‏" ‏ ‏(‏‏(‏متفق عليه‏)‏‏)‏‏.‏

sunnah.com