Sayyidah Aishah (may Allah be pleased with her) said that the Messenger of Allah (peace and blessings be upon him) said: "The lawful is not corrupted by the unlawful. Whoever commits zina with a woman, there is no harm on him if he marries her mother or her daughter; but as for (a relationship through) marriage, then no."
This Uthman bin Abd al-Rahman al-Waqqasi is alone in narrating it, and he is da'if (weak), as Yahya bin Ma'in and other hadith imams said. What is correct is from Ibn Shihab al-Zuhri from Ali (may Allah be pleased with him), mursal and mawquf (stopping at him). According to some scholars, the hadith of Abdullah al-Umari is better. And Allah knows best.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 13967