كتاب القدر
46  
The Book of Destiny
(6)
Chapter: The Meaning Of "Every Child Is Born In A State Of Fitrah" And The Ruling On The Dead Children Of The Disbelievers And Of The Muslims.
(6)
بَاب مَعْنَى كُلِّ مَوْلُودٍ يُولَدُ عَلَى الْفِطْرَةِ وَحُكْمِ مَوْتِ أَطْفَالِ الْكُفَّارِ وَأَطْفَالِ الْمُسْلِمِينَ
Sahih Muslim 2659 b

Abu Huraira reported that Allah's Messenger (ﷺ) was asked about the children of the polytheists, whereupon he said:

It is Allah Who knows best what they would be doing.
حَدَّثَنَا أَبُو الطَّاهِرِ، أَخْبَرَنَا ابْنُ وَهْبٍ، أَخْبَرَنِي ابْنُ أَبِي ذِئْبٍ، وَيُونُسُ، عَنِ ابْنِ، شِهَابٍ عَنْ عَطَاءِ بْنِ يَزِيدَ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم سُئِلَ عَنْ أَوْلاَدِ الْمُشْرِكِينَ فَقَالَ ‏ "‏ اللَّهُ أَعْلَمُ بِمَا كَانُوا عَامِلِينَ ‏"‏ ‏.‏
Reference : Sahih Muslim 2659b
In-book reference : Book 46, Hadith 41
USC-MSA web (English) reference : Book 33, Hadith 6430
  (deprecated numbering scheme)