If she did a mistake and her character is not inherently like that, then it is permissible for you to marry her when she repents. This is the safest and majority view.
Whether or not you should actually marry her is personal choice and you should carefully deliberate on that yourself. Can you be sure that the affair is over? Will this issue come up again in the future when you have arguments? Would you hold this against her and use it as a taunt? What if your children ever found out? How will you two react in-front of the other cousin?
---
The Quranic verse that is relevant here is:
Quran 24:3
الزَّانِيَةُ وَالزَّانِي فَاجْلِدُوا كُلَّ وَاحِدٍ مِّنْهُمَا مِائَةَ
جَلْدَةٍ ۖ وَلَا تَأْخُذْكُم بِهِمَا رَأْفَةٌ فِي دِينِ اللَّهِ إِن
كُنتُمْ تُؤْمِنُونَ بِاللَّهِ وَالْيَوْمِ الْآخِرِ ۖ وَلْيَشْهَدْ
عَذَابَهُمَا طَائِفَةٌ مِّنَ الْمُؤْمِنِينَ
The fornicator does not marry except a [female] fornicator or
polytheist, and none marries her except a fornicator or a polytheist,
and that has been made unlawful to the believers.
Also
Quran 5:5
... وَالْمُحْصَنَاتُ مِنَ الْمُؤْمِنَاتِ ...
... And [lawful in marriage are] chaste women from among the believers
...
Tafsir Al Qurtubi mentions the following interpretations on 24:3:
Nikah here means intercourse and the purpose of the verse is to denounce fornication rather than to establish legality of a marriage i.e it means one who has intercourse with an immoral person is themselves immoral, and that both partners are equally sinful ... one who has intercourse with a prostitute is as sinful as the prostitute.
It refers to habitual offenders and professional prostitutes and not those who have done Zina occasionally as a mistake. This is because the Asbabul Nazool (reason for revelation) have narrations about a Muslim man seeking permission to marry a woman with immoral character. This is also the interpretation for 5:5, i.e. the person should not be habitually immoral.
It refers to one who commits Zina and is punished by the Hadd, that they should not be married (ever). This is in line with the following Hadith:
Sunan Abu Daud The Prophet (ﷺ) said: The adulterer who has been
flogged shall not marry save the one like him. لا ينكح الزاني المحدودُ إلا مثله
This is a minority view.
The one who is an open fornicator or indulged in other immoral acts, and then marries a woman from a respectable house by deceiving them ... then they have the right, if they wish they can stay with him, and if they wish they can enforce seperation between them.
A group says: This verse is in effect. Their Ulema say that one who commits Zina, his Nikah with his wife is annuled, and when a woman commits Zina her Nikah with the husband is annuled. Some of them said, it is not automatically invalidated but the husband will be told to give divorce to the wife and it will be sinful for him to continue. And that it is not permitted to Marry a fornicator or fornicatoress unless repentance is visible, and then marriage is permitted.
If 24:3 prohibited marriage with a fornicator then it is superseded by 24:32, since "the unmarried among you" will include fornicators.
قال أبو جعفر النحاس: وهذا القول عليه أكثر العلماء. وأهل الفُتْيا
يقولون: إنّ من زنى بامرأة فله أن يتزوجها ولغيره أن يتزوّجها. وهو قول
ابن عمر وسالم وجابر بن زيد وعطاء وطاوس ومالك بن أنس، وهو قول أبي حنيفة
وأصحابه. وقال الشافعيّ: القول فيها كما قال سعيد بن المسيّب، إن شاء
الله هي منسوخة
Abu Jafar Nihas said: This is the saying of the majority of the Ulema.
They say: One who has commited Zina with a woman, it is permitted for
him to marry her, and it is permitted for any other man to marry her.
This is the saying of Ibn Umar, Salim, Jabir bin Zayed, Ata, Tawus and
Imam Malik bin Anas and the same is the saying of Abu Hanifa and his
companions. Imam Shafi said: This is as Saeed Bin Musaib said, By
God's will it is abrogated.
The view of the Hanbali school of thought is that such a marriage should not be done unless the guilty party has sincerely repented.
From Tafsir Ibn Kathir:
ومن ههنا ذهب الإمام أحمد بن حنبل رحمه الله إلى أنه لا يصح العقد من
الرجل العفيف على المرأة البغي ما دامت كذلك حتى تستتاب، فإن تابت، صح
العقد عليها، وإلا فلا، وكذلك لا يصح تزويج المرأة الحرة العفيفة بالرجل
الفاجر المسافح حتى يتوب توبة صحيحة لقوله تعالى { وَحُرِّمَ ذٰلِكَ
عَلَى ٱلْمُؤْمِنِينَ
Imam Ahmad ibn Hanbal said the marriage of a chaste and pious man with
an immoral woman is not correct unless they repent. After repentance
it is correct. Similarly the Nikah of a pious and chaste woman is
invalid when done with an immoral man, until they repent, because God
has said: This is forbidden to the Believers.