The Prophet ﷺ said, "Under every hair there is impurity, so wash the hair thoroughly and cleanse the skin."
حدثنا نصر بن علي حدثنا الحارث بن وجيه قال حدثنا مالك بن دينار عن محمد بن سيرين
عن النبي ﷺ قال تحت كل شعرة جنابة فاغسلوا الشعر وأنقوا البشر
Its chain of transmission is daif. Abu Dawud recorded it in the Book of Purification, chapter on ghusl from janaba, no. 248, and Ibn Majah, no. 597, both from Nasr bin Ali through this chain. There is also a narration on this subject from Ali, [Abu Dawud, no. 249], and from Anas, [Majma, 1/271, 272].