Conducting liʿān (mutual cursing between husband and wife in cases of unproven accusation of adultery) in the mosque is permissible, as indicated by the narration in Ṣaḥīḥ al-Bukhārī:
فَتَلَاعَنَا فِي الْمَسْجِدِ
“The two of them performed liʿān in the mosque.”
Reference:
[Ṣaḥīḥ al-Bukhārī: 5309, Kitāb al-Ṭalāq, Bāb al-Talāʿun fī al-Masjid]