The Messenger of Allah ﷺ said, "Shall I tell you what the greatest of the major sins are?"They replied, "Yes, Messenger of Allah."He said, "Associating partners with Allah, disobeying one's parents, and bearing false witness," or he said, "speaking falsehood."The Messenger of Allah ﷺ kept repeating it until we wished he would stop.
حدثنا حميد بن مسعدة حدثنا بشر بن المفضل عن الجريري
أن رسول الله ﷺ قال ألا أخبركم بأكبر الكبائر قالوا بلى يا رسول الله قال الإشراك بالله وعقوق الوالدين وشهادة الزور أو قول الزور قال فما زال رسول الله ﷺ يقولها حتى قلنا ليته سكت
Agreed upon (Bukhari and Muslim). Bukhari narrated it in "Testimonies," the chapter on what has been said regarding false testimony, hadith no. 2654, from the narration of Bishr bin Mufaddal, and Muslim, hadith no. 87, from the narration of Jareeri through the same route. It has also appeared previously at no. 1901.There is also a narration on this topic from Abdullah bin Amr [Bukhari, no. 5973, and Muslim, no. 90] and from Abdullah bin Umar [Ibn Majah, no. 2373].