Sayyidah Aishah Siddiqah (may Allah be pleased with her) states: The Prophet (peace and blessings be upon him) was asked about a man who has an unlawful relationship with a woman: may he marry that woman's mother? Or a man who has an unlawful relationship with a mother: may he marry her daughter? The Prophet (peace and blessings be upon him) said: "What is unlawful does not make the lawful unlawful; prohibition is established only by what comes through a lawful marriage."
Al-Tabarani recorded it in al-Mu'jam al-Awsat; its chain contains Uthman bin Abd al-Rahman al-Zuhri, who is matruk (abandoned).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب النكاح / 7415