The Messenger of Allah ﷺ said, "The buyer and seller each have the option to cancel the transaction as long as they have not parted. If they are truthful and disclose any defects, their transaction will be blessed for them, but if they lie and conceal, the blessing of their transaction will be wiped out."
حدثنا عفان حدثنا حماد بن سلمة أخبرنا قتادة عن أبي الخليل عن عبد الله بن الحارث بن نوفل
أن رسول الله ﷺ قال البيعان بالخيار ما لم يتفرقا فإن صدقا وبينا بورك لهما في بيعهما وإن كذبا وكتما محقت بركة بيعهما
Its isnad is sahih. Abul-Khalil is Salih bin Abu Maryam, mentioned shortly before. The hadith was mentioned previously at 15251.