Sahih Muslim
Sahih Muslim 1109 b
The fasting is valid for the one who is Junub when dawn comes
Arabic hadith text
وَحَدَّثَنِي حَرْمَلَةُ بْنُ يَحْيَى، أَخْبَرَنَا ابْنُ وَهْبٍ، أَخْبَرَنِي يُونُسُ، عَنِ ابْنِ شِهَابٍ، عَنْ عُرْوَةَ بْنِ الزُّبَيْرِ، وَأَبِي، بَكْرِ بْنِ عَبْدِ الرَّحْمَنِ أَنَّ عَائِشَةَ، زَوْجَ النَّبِيِّ صلى الله عليه وسلم قَالَتْ قَدْ كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلميُدْرِكُهُ الْفَجْرُ فِي رَمَضَانَ وَهُوَ جُنُبٌ مِنْ غَيْرِ حُلُمٍ فَيَغْتَسِلُ وَيَصُومُ .
Translation
'A'isha, the wife of the Messenger of Allah (ﷺ), said
The dawn broke upon the Messenger of Allah (ﷺ) during the Ramadan in a state of junub not because of sexual dream (but on account of intercourse) and he washed himself and observed fast.