Hadithcore
Mishkat al-Masabih, 3053

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.” Tirmidhi, Abu Dawud and Ibn Majah transmitted it.

وَعَن وائلة بْنِ الْأَسْقَعِ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «تَحُوزُ الْمَرْأَةُ ثَلَاثَ مَوَارِيثَ عَتِيقَهَا وَلَقِيطَهَا وَوَلَدَهَا الَّذِي لَاعَنَتْ عَنْهُ» . رَوَاهُ التِّرْمِذِيّ وَأَبُو دَاوُد وَابْن مَاجَه

References1 variant
In-Book Reference
Book 12, Hadith 12