Ibn Umar (may Allah be pleased with them both) narrated that we used to practice mukhabarah and did not see any harm in it, until Rafi‘ (may Allah be pleased with him) expressed the opinion that the Prophet (ﷺ) had forbidden it, so we abandoned it for that reason.
Hadith Referenceمسند الإمام الشافعي / كتاب البيوع / 1415
Hadith Takhrijاخرجه البخاري، الاجارة، باب اذا استأجر ارضا فمات احدهما (2285)، (2286) ومسلم، البيوع، باب كراء الأرض (1547)۔