Imam Barbahaari رحمه الله said in his famous book Sharh us-Sunnah:

“And whoever denies or doubts a letter from the Quran or in anything

that the Prophet ﷺ came with, he will meet Allah -the Most High- as a denier. So fear Allah, be cautious and maintain your Emaan.”

Sheikh Saalih al-Fawzaan mentions in his explanation:

His (Imam Barbahaari’s) saying [“And whoever denies or doubts a letter from the Quran or anything that the Prophet ﷺ came with.”]

Whoever doubts anything from the Quran even if it is a letter, he is a kaafir (disbeliever), because he has belied Allah, or he doubts anything from the speech of the Messenger ﷺ that which is confirmed from him. Like the one who says “even if this hadith is confirmed from the Messenger ﷺ, I do not believe what is within it (the hadith)” or he says “ I am in doubt” or “ I will withhold”. This individual is a rejecter of the Messenger ﷺ, because what is obligatory is to have an unshakable belief in Allah’s words and His Messenger’s ﷺ words, and the person should not be hesitant or withhold in anything from it (Quran and Sunnah).

Rather he believes in all of the Quran and all of that which is authentically narrated from the Messenger .

In all that has come from Allah and His Messenger ﷺ, one should not doubt or withhold. This is the path of the people of Emaan; to believe in that which is in the Book of Allah and in the Sunnah of the Messenger ﷺ.

His (Imam Barbahaari’s) saying [“So fear Allah, be cautious and maintain your Emaan.”]

Fear Allah that doubt should occur in your heart regarding the speech of Allah or in the speech of the Messenger ﷺ or in the beliefs of Ahl as-Sunnah wal-Jama’ah. Safeguard your Emaan from falling into any of that.

Translated By @MarkazBukhari