Hadithcore
Sunan Abi Dawud, 4716

Explaining the tradition “Every child is a born on Islam”, Hammad b. Salamah said :

In our opinion it means that covenant which Allah had taken in the loins of their fathers when He said : “Am I not your Lord? They said: Yes.

حَدَّثَنَا الْحَسَنُ بْنُ عَلِيٍّ، حَدَّثَنَا حَجَّاجُ بْنُ الْمِنْهَالِ، قَالَ سَمِعْتُ حَمَّادَ بْنَ سَلَمَةَ، يُفَسِّرُ حَدِيثَ ‏

‏ كُلُّ مَوْلُودٍ يُولَدُ عَلَى الْفِطْرَةِ ‏

‏ ‏.‏ قَالَ هَذَا عِنْدَنَا حَيْثُ أَخَذَ اللَّهُ عَلَيْهِمُ الْعَهْدَ فِي أَصْلاَبِ آبَائِهِمْ حَيْثُ قَالَ ‏{‏ أَلَسْتُ بِرَبِّكُمْ قَالُوا بَلَى ‏}‏ ‏.‏

References2 variants
In-Book Reference
Book 42, Hadith 121
English Reference
Book 41, Hadith 4698