It is narrated from Sayyiduna Hassan bin Thabit that the Prophet (peace and blessings be upon him) cursed women who visit graveyards.