كتاب القدر
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 2662 a

Ubayy b. Ka'b reported that AUah's Messenger (ﷺ) said:

The young man whom Khadir killed was a non-believer by his very nature and had he survived he would have involved his parents in defiance and unbelief.
حَدَّثَنَا عَبْدُ اللَّهِ بْنُ مَسْلَمَةَ بْنِ قَعْنَبٍ، حَدَّثَنَا مُعْتَمِرُ بْنُ سُلَيْمَانَ، عَنْ أَبِيهِ، عَنْ رَقَبَةَ، بْنِ مَسْقَلَةَ عَنْ أَبِي إِسْحَاقَ، عَنْ سَعِيدِ بْنِ جُبَيْرٍ، عَنِ ابْنِ عَبَّاسٍ، عَنْ أُبَىِّ بْنِ كَعْبٍ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ إِنَّ الْغُلاَمَ الَّذِي قَتَلَهُ الْخَضِرُ طُبِعَ كَافِرًا وَلَوْ عَاشَ لأَرْهَقَ أَبَوَيْهِ طُغْيَانًا وَكُفْرًا ‏"‏ ‏.‏
Reference : Sahih Muslim 2662 a
In-book reference : Book 46, Hadith 45
USC-MSA web (English) reference : Book 33, Hadith 6434
  (deprecated numbering scheme)