The Messenger of Allah ﷺ forbade the sale of fruits before their ripeness becomes apparent, prohibiting both the seller and the buyer.
حدثنا عبد الله بن مسلمة القعنبي عن مالك عن نافع
أن رسول الله ﷺ نهى عن بيع الثمار حتى يبدو صلاحها نهى البائع والمشتري
Bukhari narrated it in the Book of Sales, Chapter on Selling Fruit Before Its Ripeness Appears, hadith no. 2194, and Muslim narrated it in the Book of Sales, Chapter on the Prohibition of Selling Fruit Before Its Ripeness Appears Without Stipulating Immediate Harvest, hadith no. 1534, both from the hadith of Malik through this chain. It is also found in Muwatta (Yahya's recension), 2/618.