Wa `alaykum As-Salamu waRahmatullahi wa Barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
There is no harm that heirs receive the social security benefits of their deceased father.
Answering your question, the General Iftaa’ Department in Jordan, states the following:
However, if the person had covered his/her subscriptions in the Social Security Corporation with unlawful money, this doesn’t render the benefits, that he/she is entitled to receive from that Corporation, unlawful.
The contract between these two parties isn’t commutative; rather, it is one of donation and benevolence, and this is the view adopted by the Iftaa’ Council’s Resolution No. (174).
Accordingly, there is no harm that heirs receive the social security benefits of their deceased father.
Almighty Allah knows best.