Yahya related to me from Malik that Abu'r-Rijal Muhammad ibn Abd ar-Rahman heard his mother Amra bint Abd ar-Rahman say, "The Messenger of Allah ﷺ cursed both men and women who dug up," meaning those who dug up graves.
تَقُولُ لَعَنَ رَسُولُ اللَّهِ ﷺ الْمُخْتَفِيَ وَالْمُخْتَفِيَةَ يَعْنِي نَبَّاشَ الْقُبُورِ