حَدَّثَنَا مُسَدَّدٌ، حَدَّثَنَا أَبُو عَوَانَةَ، عَنْ أَبِي بِشْرٍ، عَنْ سَعِيدِ بْنِ جُبَيْرٍ، عَنِ ابْنِ عَبَّاسٍ، أَنَّ النَّبِيَّ صلى الله عليه وسلم سُئِلَ عَنْ أَوْلاَدِ الْمُشْرِكِينَ فَقَالَ ‏"‏ اللَّهُ أَعْلَمُ بِمَا كَانُوا عَامِلِينَ ‏"‏ ‏.‏
Translation
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.