Al-Kāfi - Volume 7 > One who Dies without Leaving Behind any Heirs
Hadith #3

3- عَلِيُّ بْنُ إِبْرَاهِيمَ عَنْ أَبِيهِ عَنْ حَمَّادِ بْنِ عِيسَى عَنْ بَعْضِ أَصْحَابِنَا عَنْ أَبِي الْحَسَنِ الأوَّلِ (عَلَيْهِ السَّلام) قَالَ الإمَامُ وَارِثُ مَنْ لا وَارِثَ لَهُ.

3. Ali ibn Ibrahim has narrated from his father from Hammad ibn ‘Isa from certain persons of our people who has narrated the following: “Abu al-Hassan, al-Awwal, ‘Alayhi al-Salam, has said, ‘Al-Imam is the heir of one who does not have any heirs.’”