The Messenger of Allah ﷺ said, "Injury caused by livestock is unaccountable, harm from a well is unaccountable, and harm from a mine is unaccountable, but on buried treasure a fifth is due."
حدثنا هاشم بن القاسم حدثنا أبو جعفر يعني الرازي عن أبي الزناد عن الأعرج
قال رسول الله ﷺ العجماء جبار والبئر جبار والمعدن جبار وفي الركاز الخمس
Its isnad is sahih. It was previously mentioned at 7690 with the same wording. It was also narrated by Bukhari 2/160, Muslim in Hudud 45, Abu Dawud 4593, Tirmidhi 642 and 1377 who graded it sahih, Nasai 5/45, Ibn Majah 261, Abdul-Razzaq 18373, Tabarani in al-Kabir 10/107, and Ibn Khuzayma 2326. It was previously noted that the meaning of "jubar" is "forfeited" (that is, no liability attaches to it).