The Messenger of Allah ﷺ said, "If any man declares another to be a disbeliever, then either it is as he said, or else the charge of disbelief returns upon himself."
حدثنا يعلى بن عبيد حدثنا فضيل يعني ابن غزوان عن نافع
قال رسول الله ﷺ أيما رجل كفر رجلا فإن كان كما قال وإلا فقد باء بالكفر
Its isnad is sahih. It is a repetition of 4687 with similar wording.