From Sahih Muslim (Hadith 3862):
Ibn 'Umar (Allah be pleased with them) reported that Allah's Messenger (ﷺ) forbade the sale of fruits until they were clearly in good condition, he forbade it both to the seller and to the buyer
Reference: Muslim 3862