In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
Medical experts can determine which diseases are transmitted by sexual intercourse and are thus [a cause] for annulling the marriage, and which ones are not and therefore do not annul a marriage.
Answering your question, Dar Al-Ifta Al-Misriyyah, states:
The diseases and defects that permit the annulment of a marriage contract have been determined by scholars in the past ages. Three of these defects are common to both men and women: insanity, vitiligo, and leprosy; while two are particular to each [sex].
The defects particular to men are impotency and a severed penis; and the defects specific to women are vaginal constriction because of flesh or of bone.
Modern scholars have used these as a base case for similar defects and diseases which have appeared in modern times and which numerous physicians have determined to be transmitted by sexual intercourse.
These include AIDS – but not cancer or some types of viral hepatitis; (e.g. hepatitis C is non-communicable except if its carrier has a wound through which the disease can be transmitted to his partner).
To sum up, medical experts can determine which diseases are transmitted by sexual intercourse and are thus [a cause] for annulling the marriage, and which ones are not and therefore do not annul a marriage.
Almighty Allah knows best.
Source: Egypt’s Dar Al-Ifta