Bulugh al-Maram 900
وَعَنْ رَافِعِ بْنِ خَدِيجٍ - رضي الله عنه - قَالَ: قَالَ رَسُولُ اللَّهِ - صلى الله عليه وسلم: «مَنْ زَرَعَ فِي أَرْضِ قَوْمٍ بِغَيْرِ إِذْنِهِمْ, فَلَيْسَ لَهُ مِنَ الزَّرْعِ شَيْءٌ, وَلَهُ نَفَقَتُهُ». رَوَاهُ أَحْمَدُ, وَالْأَرْبَعَةُ إِلَّا النَّسَائِيَّ, وَحَسَّنَهُ التِّرْمِذِيُّ. وَيُقَالُ: إِنَّ الْبُخَارِيَّ ضَعَّفَهُ.
From Rafiʿ ibn Khadij, may Allah be pleased with him, who said: The Messenger of Allah ﷺ said: "Whoever cultivates in people's land without their permission has nothing of the crop, but he gets his expenses." Reported by Ahmad and the four except an-Nasaʾi; at-Tirmidhi graded it hasan. It is said that al-Bukhari graded it weak.