The Prophet (ﷺ) said: If anyone sows in other people's land without their permission, he has no right to any of the crop, but he may have what it cost him.
Sunan Abi Dawud Book 23, Hadith 78