Sunan an-Nasa'i, Hadith 3434 ⓘ
It was narrated that Abu Hurairah said: "The Messenger of Allah said: 'Allah, the Mighty and Sublime, has forgiven my Ummah for what is whispered to them or what enters their minds, so long as they do not act upon it or speak of it.'"
أَخْبَرَنَا عُبَيْدُ اللَّهِ بْنُ سَعِيدٍ، قَالَ حَدَّثَنَا ابْنُ إِدْرِيسَ، عَنْ مِسْعَرٍ، عَنْ قَتَادَةَ، عَنْ زُرَارَةَ بْنِ أَوْفَى، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " إِنَّ اللَّهَ عَزَّ وَجَلَّ تَجَاوَزَ لأُمَّتِي مَا وَسْوَسَتْ بِهِ وَحَدَّثَتْ بِهِ أَنْفُسَهَا مَا لَمْ تَعْمَلْ أَوْ تَتَكَلَّمْ بِهِ " .
also referenced under: Book 27, Hadith 46 (In-Book) & Volume 4, Book 27, Hadith 3464 (DarusSalam)