An opportunistic infection is an infection caused by a bacteria, virus, fungus, or parasite that normally doesn’t make healthy people sick. These organisms are often present in everyday environments, even inside your own body, but they only cause disease when the immune system is too weak to keep them in check. The key distinction is that the pathogen is “opportunistic,” taking advantage of a gap in your body’s defenses rather than being powerful enough to overwhelm a healthy immune system on its own.
Why the Immune System Matters
Your immune system constantly fights off microorganisms. Many of the germs responsible for opportunistic infections are ones you’ve likely already been exposed to. Fungi float in household dust. Certain viruses live dormantly in your body after an initial infection years ago. Bacteria line your gut and skin. A healthy immune system keeps all of these in balance.
When that system is compromised, organisms that were previously harmless can multiply unchecked. This is why the same fungus that causes no trouble for most people can cause life-threatening pneumonia in someone with severely depleted immune cells. The infection isn’t just about the germ. It’s about the gap between the germ and the body’s ability to respond.
Not every infection in an immunocompromised person counts as opportunistic. If someone on immune-suppressing medication catches chickenpox and recovers normally, that’s considered a standard infection, one that probably would have happened regardless of their immune status. An infection is classified as opportunistic specifically because it exploits immune weakness to cause disease it otherwise couldn’t.
Who Is at Risk
The most well-known risk group is people living with advanced HIV. As HIV destroys a specific type of immune cell (CD4 cells), the body becomes progressively vulnerable. At specific CD4 thresholds, the risk for particular infections rises sharply. Below 200 cells per cubic millimeter, a fungal lung infection called Pneumocystis pneumonia becomes a serious threat. Below 100, the risk of a brain infection from the parasite Toxoplasma increases. Below 50, a bacterial infection from Mycobacterium avium complex (MAC), an organism found in tap water and household dust, can spread throughout the body.
But HIV is far from the only cause. Many conditions and treatments weaken the immune system enough to invite opportunistic infections:
- Cancer treatment: Chemotherapy and radiation kill rapidly dividing cells, including immune cells, leaving the body exposed during treatment cycles.
- Organ transplantation: Transplant recipients take medications to suppress their immune system so it won’t reject the new organ. In the first month after transplant, bacterial infections account for over 90% of infections. Between months one and six, viral infections become more common, making up about 21% of cases.
- Autoimmune diseases: Conditions like lupus, rheumatoid arthritis, and Sjögren’s syndrome can weaken immunity on their own, and the medications used to manage them (corticosteroids, methotrexate, and similar drugs) suppress it further. One study found that 91% of non-HIV patients diagnosed with Pneumocystis pneumonia for the first time had used corticosteroids within the prior month.
- Malnutrition and chronic illness: Zinc deficiency, inflammatory bowel disease, kidney failure, and chronic alcohol use all reduce the body’s ability to fight infection.
Common Opportunistic Infections
Fungal Infections
Pneumocystis pneumonia (PCP) is one of the most recognized opportunistic infections and was historically one of the first signs of AIDS. It causes fever, dry cough, and progressive shortness of breath. In people with HIV, symptoms tend to develop slowly over weeks. In people whose immune systems are suppressed for other reasons, the onset can be much more sudden, sometimes escalating to respiratory failure. Both groups typically have low oxygen levels by the time they seek care.
Candidiasis (thrush) is another common fungal opportunistic infection. Candida yeast lives in the mouth and digestive tract of most people, but in immunocompromised individuals it can overgrow and spread to the esophagus, making swallowing painful, or enter the bloodstream.
Viral Infections
Cytomegalovirus (CMV) infects a large percentage of the general population and causes, at most, mild flu-like symptoms in healthy people. In someone with a weakened immune system, the same virus can attack the eyes, lungs, liver, esophagus, stomach, and intestines. CMV eye disease can lead to blindness if untreated. In babies born with CMV, the most common long-term problem is hearing loss, which may not appear until later in childhood.
Bacterial Infections
Mycobacterium avium complex (MAC) is a group of bacteria found in drinking water, dirt, and household dust. Healthy people inhale or swallow these bacteria regularly without consequence. In people with severely weakened immune systems, MAC can spread through the bloodstream and cause fever, drenching night sweats, weight loss, abdominal pain, fatigue, and diarrhea.
Tuberculosis, while capable of infecting healthy people, behaves far more aggressively in immunocompromised individuals and is considered opportunistic in that context. It can spread beyond the lungs to bones, the brain, and other organs.
Parasitic Infections
Toxoplasmosis is caused by a parasite commonly found in undercooked meat and cat feces. Most healthy people who contract it never know. In someone with a severely weakened immune system, the parasite can reactivate in the brain, causing confusion, seizures, and coordination problems.
Why Diagnosis Can Be Difficult
Opportunistic infections are notoriously tricky to diagnose. The symptoms, fever, fatigue, weight loss, cough, overlap with dozens of other conditions. Standard blood cultures, while important, can take several days and may miss slow-growing or unusual organisms. Blood tests for antibodies can’t always distinguish between an old, resolved infection and an active one, which is a real problem in people who’ve been exposed to common viruses like CMV throughout their lives.
Molecular testing that detects the genetic material of a pathogen (PCR testing) has improved speed and accuracy significantly. These tests can identify specific organisms within hours rather than days. Still, diagnosis often requires combining clinical suspicion, imaging like chest CT scans, and sometimes tissue biopsies or fluid samples from the lungs.
Prevention for High-Risk Groups
For people with HIV, the most effective prevention is antiretroviral therapy. Keeping the virus suppressed allows CD4 cell counts to recover, which dramatically reduces the risk of opportunistic infections. When CD4 counts remain low, preventive medications are prescribed at specific thresholds to ward off the most dangerous infections before they start.
For transplant recipients and others on long-term immune suppression, preventive antibiotics and antiviral medications are standard during the highest-risk periods. Regular monitoring of immune cell levels helps guide when to start or stop these protective treatments.
Everyday precautions matter too, especially around food. The CDC recommends that people with weakened immune systems avoid raw or undercooked meat, poultry, eggs, and seafood. Unpasteurized milk and juice, soft cheeses like queso fresco and brie, premade deli salads, unheated deli meats, raw sprouts, and unwashed fruits and vegetables all carry elevated risk. People on dialysis are 50 times more likely to develop a Listeria infection than the general population, making food safety especially critical. Cut melon left at room temperature for more than two hours (or one hour above 90°F) should be discarded. The four basic principles: clean, separate, cook, and chill, apply to everyone but are especially important when your immune system can’t serve as a backup.
Good hygiene habits, like frequent handwashing and avoiding contact with cat litter (to reduce Toxoplasma exposure), provide an additional layer of protection that costs nothing but can prevent serious illness.

