The Messenger of Allah ﷺ said, "Every child is born upon the religion, and it is his parents who make him a Jew, or a Christian, or one who associates partners with Allah."It was said, "Messenger of Allah, what of one who dies before that?"He said, "Allah knows best what they would have done."Abu Kurayb and Husayn bin Hurayth reported to us, both saying that Waki reported from Amash, from Abu Salih, from Abu Hurairah, from the Prophet ﷺ, something similar in meaning, and in that report he said, born upon the fitrah.
حدثنا محمد بن يحيى القطعي البصري حدثنا عبد العزيز بن ربيعة البناني حدثنا الأعمش عن أبي صالح
قال رسول الله ﷺ كل مولود يولد على الملة فأبواه يهودانه أو ينصرانه أو يشركانه قيل يا رسول الله فمن هلك قبل ذلك قال الله أعلم بما كانوا عاملين به حدثنا أبو كريب والحسين بن حريث قالا حدثنا وكيع عن الأعمش عن أبي صالح عن أبي هريرة عن النبي ﷺ نحوه بمعناه وقال يولد على الفطرة
Muslim also recorded it in the Book of Qadar, in the chapter on the meaning of "Every child is born upon fitrah..." etc, Hadith 23/2658, from the hadith of Amash with the same wording. Bukhari also narrated it, Hadith 1358, 1359, 4775, 6599, 6600, and others, through various routes from Abu Hurairah with the same wording.There is also a version on this subject from Aswad bin Sarie [Ahmad 3/435].