From Sahih Bukhari (Hadith 6913):
Narrated Abu Huraira:The Prophet (ﷺ) said, "There is no Diya for a person injured or killed by an animal (going about without somebody to control it) and similarly, there is no Diya for the one who falls and dies in a well, and also the one who dies in a mine. As regards the Ar-Rikaz (buried wealth), one-fifth thereof is for the state
Reference: Bukhari 6913