The Prophet ﷺ forbade mukhabarah, muzabanah, muhaqalah, and the sale of fruit before it ripens, except in the case of arāyā. Yunus bin Ubayd narrated it similarly.
أخبرنا قتيبة قال حدثنا المفضل عن ابن جريج عن عطاء وأبي الزبير
أن النبي ﷺ نهى عن المخابرة والمزابنة والمحاقلة وبيع الثمر حتى يطعم إلا العرايا تابعه يونس بن عبيد
Bukhari narrated it in the Book of Musaqah, chapter on a man who has a right of way or a share of water in a garden or in palm trees, hadith no. 2381, and Muslim narrated it in the Book of Sales, chapter on the prohibition of muhaqalah and muzabanah, and on mukhabarah, hadith no. 81/1536, 82, after hadith no. 1543, from the hadith of Ibn Jurayj, with the same wording. It is also found in Al-Kubra, hadith no. 4606.