It is narrated from Umrah bint Abdur Rahman that the Prophet ﷺ cursed both the one who reveals the secrets of seclusion and the one with whom it is done.
Hadith Referenceمسند الإمام الشافعي / كتاب النكاح / 1145
Hadith Takhrijاسناده ضعيف لارساله اخرجه البيهقى 8 / 270 - وفى المعرفة السنن والآثار له (5170)۔