“I saw the Messenger of Allah (ﷺ) raising his hands until I saw the whiteness of his armpits, saying: 'No child should be punished because of his mother's crime, no child should be punished because of his mother's crime.”
Sunan Ibn Majah Book 21, Hadith 56