Yahya related to me from Malik from Abu'r-Rijal Muhammad ibn Abd ar-Rahman ibn Haritha from his mother, Amra bint Abd ar-Rahman that the Messenger of Allah ﷺ forbade selling fruit until it was clear of blight. Malik said, "Selling fruit before it has begun to ripen is an uncertain transaction (gharar) ."
أَنَّ رَسُولَ اللَّهِ ﷺ نَهَى عَنْ بَيْعِ الثِّمَارِ حَتَّى تَنْجُوَ مِنَ الْعَاهَةِ قَالَ مَالِكٌ وَبَيْعُ الثِّمَارِ قَبْلَ أَنْ يَبْدُوَ صَلاَحُهَا مِنْ بَيْعِ الْغَرَرِ