حَدَّثَنَا أَحْمَدُ بْنُ يُونُسَ، حَدَّثَنَا زُهَيْرٌ، حَدَّثَنِي إِسْمَاعِيلُ، عَنْ عَامِرٍ، عَنِ الْحَارِثِ، عَنْ عَلِيٍّ، رضى الله عنه - قَالَ إِسْمَاعِيلُ وَأُرَاهُ قَدْ رَفَعَهُ إِلَى النَّبِيِّ صلى الله عليه وسلم - أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ ‏"‏ لَعَنَ اللَّهُ الْمُحَلِّلَ وَالْمُحَلَّلَ لَهُ ‏"‏ ‏.‏
Translation
Narrated Ali ibn AbuTalib

(The narrator Isma'il said: I think ash-Sha'bi attributed this tradition to the Prophet)

The Prophet (ﷺ) said: Curse be upon the one who marries a divorced woman with the intention of making her lawful for her former husband and upon the one for whom she is made lawful.