Mishkat al-Masabih 551
وَعَنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «مَنْ أَتَى حَائِضًا أَوِ امْرَأَةً فِي دُبُرِهَا أَوْ كَاهِنًا فَقَدْ كَفَرَ بِمَا أُنْزِلَ عَلَى مُحَمَّدٍ» . رَوَاهُ التِّرْمِذِيُّ وَابْنُ مَاجَهْ وَالدَّارِمِيُّ وَفِي رِوَايَتِهِمَا: «فَصَدَّقَهُ بِمَا يَقُولُ فَقَدْ كَفَرَ» وَقَالَ التِّرْمِذِيُّ: لَا نَعْرِفُ هَذَا الْحَدِيثَ إِلَّا من حَدِيث حَكِيم الْأَثْرَم عَن أبي تَيْمِية عَن أبي هُرَيْرَة
From Abu Hurayrah, may Allah be pleased with him, who said: The Messenger of Allah ﷺ said: "Whoever has intercourse with a menstruating woman, or with a woman in her back passage, or goes to a soothsayer, has disbelieved in what was revealed to Muhammad." Reported by at-Tirmidhi, Ibn Majah and ad-Darimi, and in the narration of the latter two: "and believes him in what he says, has disbelieved." At-Tirmidhi said: We do not know this hadith except from the hadith of Hakim al-Athram, from Abu Tamimah, from Abu Hurayrah.