‘Amr b. Shu'aib, on his father's authority, said his grandfather reported the Prophet as saying, “If a man commits fornication with a freewoman or a slave woman the child is the product of fornication, and neither does he inherit nor may anyone inherit from him."
Narrated Wathila b. al-Asqa‘ reported God’s Messenger as saying, “A woman gets inheritance from the three following:
one she has set free, a foundling, and her child about whom she has invoked a curse on herself if she was untrue in declaring he was not born out of wedlock.”
‘A’isha said that a client of God’s Messenger died leaving some property, but no relative or child, and God’s Messenger said, “Give what he has left to a man belonging to his village."
Al-Miqdam reported God’s Messenger as saying, “I am nearer to every believer than himself, so if anyone leaves a debt or a helpless family I shall be responsible, but if anyone leaves property it goes to his heirs. I am the patron of him who has none, inheriting what he possesses and freeing him from his liabilities. A maternal uncle is heir of him who has none, inheriting his property and freeing him from his liabilities.” A version has, “I am the heir of him who has none, paying blood wit for him and inheriting from him; and a maternal uncle is the heir of him who has none, paying blood wit for him and inheriting from him.”