The Messenger of Allah ﷺ said, "Among the greatest of fabrications is for a man to claim someone other than his father as his father, or to claim his eye saw what it did not see, or to attribute to the Messenger of Allah ﷺ what he did not say."
قال رسول الله ﷺ: إن من أعظم الفرى أن يدعى الرجل إلى غير أبيه، أو يري عينه ما لم تر، أو يقول على رسول الله ﷺ ما لم يقل.
Bukhari reported it in the Book of Virtues (3509), from Ali bin Ayyash, who said, Hurayz narrated to us, Abdul-Wahid bin Abdullah Nasri narrated to me, saying, I heard Wathila bin Asqa say, and then he related it.Something of similar meaning was reported from Ali, from the Prophet ﷺ, that he said, "Whoever deliberately lies about a dream will be made to tie a knot in a barley grain on the Day of Resurrection." Tirmidhi reported it (2281, 2282), as did Ahmad (568) and (789), and Hakim (4/392–393), through various routes from Abdul-Ala Thaalabi, from Abu Abdul-Rahman Sulami, from Ali, who related it.Hakim said, "This is a hadith sahih in isnad." Dhahabi took issue with him, saying, "Abdul-Ala was declared daif by Abu Zura." I say, this is as he said, for the majority of critics declared him daif, among them Ahmad, Abu Hatim, Daraqutni, and others.