Sayyiduna Anas (may Allah be pleased with him) narrates this statement of the Prophet (peace and blessings be upon him): "Spitting in the mosque is a mistake, and its expiation is to bury it."
Hadith Referenceصحیح ابن حبان / كتاب الصلاة / 1637
Hadith Gradingفضيلة الشيخ الإمام محمد ناصر الدين الألبانيصحيح - «صحيح أبي داود» (493): ق.فضيلة الشيخ العلّامة شُعيب الأرناؤوطإسناده صحيح على شرط البخاري، رجاله رجال الشيخين غير مسدد، فمن رجال البخاري.