The Messenger of Allah ﷺ said, "Injury caused by a grazing animal carries no liability, a well carries no liability, and a mine carries no liability. As for buried treasure, a fifth is due on it."
حدثنا محمد بن بكر أخبرنا ابن جريج أخبرني ابن شهاب عن سعيد بن المسيب وأبي سلمة بن عبد الرحمن بن عوف
عن رسول الله ﷺ قال العجماء جرحها جبار والبئر جبار والمعدن جبار وفي الركاز الخمس
Its isnad is sahih, and it previously appeared at 7450 through the narration of Abdul-Razzaq from Ibn Jurayj, with the same wording. It has also appeared through other routes, the last of which was 7690.