Sunan Abi Dawud
Hadith #2076
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