med study partner

Articles & Guides › Articles › Respiratory

Tuberculosis and fungal lung infections

How Th1 immunity and caseating granulomas shape primary, latent, reactivation and miliary tuberculosis, how infection is tested for and treated and what each first-line drug does, how the endemic dimorphic fungi differ by region and appearance, and how Pneumocystis, Aspergillus, Cryptococcus and Mucor threaten immunocompromised patients.

Respiratory · 9 min read · Reviewed 2026-11-17

Tuberculosis has infected about a quarter of the world's population, and most of those people carry it silently for life, held in check by their immune systems. The fungi that cause lung disease range from soil organisms found in particular regions to opportunists that wait for the immune system to fail. In all of them, cell-mediated immunity and granulomas decide the outcome. This article covers how tuberculosis causes primary, latent and reactivation disease, how it is diagnosed and treated, the endemic mycoses, and the opportunistic fungi.

Key points

  • Tuberculosis is controlled by Th1 cells: IL-12 drives interferon-gamma, which activates macrophages, and TNF holds granulomas together, so TNF inhibitors can reactivate latent infection.
  • Primary infection forms a Ghon complex in the lower or middle lobes; reactivation favors the oxygen-rich apices and cavitates.
  • Skin tests and interferon-gamma release assays detect infection but don't separate latent from active disease; culture remains the gold standard.
  • Active disease is treated with rifampin, isoniazid, pyrazinamide and ethambutol for 2 months, then rifampin and isoniazid for 4; each drug has a signature toxicity.
  • Histoplasma, Blastomyces and Coccidioides are dimorphic fungi tied to regions; Pneumocystis strikes below a CD4 count of 200, and invasive Aspergillus strikes the neutropenic.

Tuberculosis pathogenesis

The organism

Mycobacterium tuberculosis is a slow-growing obligate aerobe. Its waxy wall, rich in mycolic acids, makes it acid-fast on Ziehl-Neelsen staining. Cord factor inhibits neutrophil migration and triggers TNF release and granuloma formation, and sulfatides block phagosome-lysosome fusion. It spreads through airborne droplet nuclei coughed out by people with active lung disease[1].

The immune response

  1. Alveolar macrophages swallow the bacteria, which block phagosome-lysosome fusion and multiply inside them.
  2. After about 3 weeks, macrophages present antigen and release IL-12, which turns CD4 T cells into Th1 cells.
  3. Th1 cells release interferon-gamma, which activates macrophages to fuse phagosomes with lysosomes, make nitric oxide and kill the bacteria.
  4. Activated macrophages release TNF-alpha, which recruits monocytes and holds granulomas together.
  5. The result is a caseating granuloma: epithelioid macrophages, Langhans giant cells with horseshoe-shaped nuclei, lymphocytes and fibroblasts around central caseous necrosis.

Inherited defects in IL-12, interferon-gamma or their receptors cause severe mycobacterial infections. TNF inhibitors such as infliximab and adalimumab can reactivate latent tuberculosis, so patients are screened before starting them[2].

Forms of tuberculosis

FormFeatures
PrimaryFirst infection, often in the lower or middle lobes under the pleura. A Ghon focus plus an involved hilar node is the Ghon complex, called a Ranke complex once calcified. It usually heals, but in young children and people with HIV it can progress
LatentLive bacteria contained in granulomas: no symptoms, not infectious, with a positive skin test or interferon-gamma release assay. Lifetime risk of reactivation is about 5–10%, much higher with HIV
Reactivation (secondary)The apical and posterior segments of the upper lobes, where oxygen is highest. Caseous necrosis drains into bronchi and leaves cavities full of bacteria, which are very infectious. Cough, hemoptysis, fever, night sweats and weight loss
MiliarySpread through the blood, with millet-seed nodules throughout the lungs and in the liver, spleen, marrow and meninges
Outside the lungsPott disease of the spine; basal meningitis with cranial nerve palsies; cervical lymphadenitis (scrofula); kidney disease with sterile pyuria; adrenal destruction with Addison disease; constrictive pericarditis; ileocecal disease; joints

The strongest risk factor for reactivation is HIV. Others include diabetes, glucocorticoids, TNF inhibitors, transplant drugs, malnutrition, alcohol use, silicosis, chronic kidney disease, older age and smoking.

Tuberculosis diagnosis and treatment

Testing for infection

Neither test separates latent infection from active disease.

TestHow it worksNotes
Tuberculin skin testA type IV hypersensitivity reaction; induration is read at 48–72 hoursPositive at 5 mm in HIV, close contacts, immunosuppression or fibrotic scars; 10 mm in recent arrivals from high-burden countries, health care workers, people who inject drugs, people with diabetes and children under 4; 15 mm in everyone else. False positives after BCG vaccination or nontuberculous mycobacteria; false negatives with immunosuppression, sarcoidosis or very recent infection
Interferon-gamma release assayMeasures interferon-gamma released by the person's T cells in response to TB-specific antigensNot affected by BCG, and needs only one visit

Testing for active disease

A chest X-ray, sputum acid-fast smears and culture, which is the gold standard but takes weeks, and nucleic acid amplification, which is rapid and can detect rifampin resistance[3].

First-line drugs

DrugMechanismKey adverse effects
RifampinInhibits bacterial DNA-dependent RNA polymeraseOrange-red urine, tears and sweat; a strong cytochrome P-450 inducer that lowers levels of warfarin, hormonal contraceptives, HIV protease inhibitors and steroids; hepatitis
IsoniazidInhibits mycolic acid synthesis; a prodrug activated by the bacterial enzyme KatG, so katG mutations cause resistancePeripheral neuropathy from pyridoxine depletion, prevented by giving pyridoxine; hepatitis, more common with age and alcohol; drug-induced lupus; seizures in overdose. Slow acetylators have higher levels
PyrazinamideWorks in the acidic environment of phagolysosomesHepatotoxicity, hyperuricemia and gout
EthambutolInhibits arabinosyl transferase, blocking cell wall synthesisOptic neuritis, with reduced acuity and red-green color blindness

Drug details follow standard pharmacology texts[4]. Rifampin's enzyme induction is a common trap: a woman on a hormonal contraceptive who starts rifampin can become pregnant, so she needs a nonhormonal method.

Treatment regimens

  • Active, drug-sensitive disease: rifampin, isoniazid, pyrazinamide and ethambutol (RIPE) for 2 months, then rifampin and isoniazid for 4 more months. Directly observed therapy improves adherence, and patients with active lung disease are isolated in negative-pressure rooms until no longer infectious[3].
  • Latent infection: shorter rifamycin regimens, such as rifampin for 4 months or weekly isoniazid with rifapentine for 3 months, are preferred; isoniazid for 6–9 months is an alternative. Active disease must be ruled out first[5].
  • Drug-resistant disease: newer regimens built on bedaquiline, pretomanid, linezolid and fluoroquinolones.
  • BCG vaccine, a live attenuated Mycobacterium bovis, protects children against severe forms such as miliary disease and meningitis and is used in high-burden countries.

Endemic mycoses

The endemic fungi are dimorphic: molds in the environment at cooler temperatures, releasing spores that are inhaled, and yeasts or spherules in tissue at body temperature ("mold in the cold, yeast in the heat"). Most infections in healthy people are silent or mild and heal into granulomas that can calcify; disseminated disease occurs when cell-mediated immunity is weak. Mild to moderate disease is treated with itraconazole (fluconazole for Coccidioides), and severe or disseminated disease with amphotericin B[1].

FungusWhereExposureTissue formClues
*Histoplasma capsulatum*Ohio and Mississippi River valleysBird or bat droppings: caves, chicken coops, old buildings, demolitionTiny oval yeasts inside macrophagesPneumonia with hilar nodes; calcified granulomas in lung and spleen; disseminated disease in advanced HIV with a large liver and spleen, low blood counts and mouth ulcers; urine antigen test
*Blastomyces dermatitidis*Ohio and Mississippi valleys and Great LakesSoil and rotting wood near waterwaysLarge yeasts with broad-based budding and thick wallsPneumonia that can mimic cancer, with skin lesions and bone disease; affects healthy people too
*Coccidioides*Desert Southwest of the US, Mexico, Central and South AmericaDust storms, earthquakes, construction and diggingLarge spherules full of endosporesValley fever: flu-like pneumonia with erythema nodosum and joint pains; spreads to skin, bone and meninges with HIV, pregnancy or immunosuppression
*Paracoccidioides*Latin AmericaRural soilYeast with many buds around it, like a captain's wheelLung, mouth and skin disease in men who work outdoors

Opportunistic fungi and Pneumocystis

Pneumocystis jirovecii pneumonia

  • Pneumocystis is a fungus but lacks ergosterol, so azoles and amphotericin don't work. It causes pneumonia when the CD4 count is below 200/mm³ and in people on long-term glucocorticoids, chemotherapy or transplant drugs.
  • Clues: weeks of dry cough, breathlessness and low fever, with marked desaturation on exertion; bilateral diffuse ground-glass shadows, sometimes with cysts and pneumothorax; a raised LDH.
  • Diagnosis: it can't be cultured, so induced sputum or bronchoalveolar lavage is examined with silver stain or immunofluorescence.
  • Treatment: TMP-SMX, adding glucocorticoids when PaO₂ is below 70 mm Hg or the A-a gradient is 35 mm Hg or more, to blunt the inflammation that follows killing of the organisms. Alternatives include pentamidine, primaquine with clindamycin, and atovaquone.
  • Prevention: TMP-SMX when the CD4 count is below 200/mm³, which also prevents toxoplasmosis below 100.

Aspergillus

Aspergillus, mainly A. fumigatus, has thin septate hyphae that branch at acute angles of about 45°. Its spores come from soil, compost and construction dust[6].

DiseaseHostFeatures
Allergic bronchopulmonary aspergillosisAsthma, cystic fibrosisHypersensitivity without invasion: eosinophilia, very high IgE, central bronchiectasis
Aspergilloma (fungus ball)An old cavity, for example from healed tuberculosis or sarcoidosisHemoptysis; a mobile ball inside the cavity with an air crescent; surgery for severe bleeding
Chronic pulmonary aspergillosisChronic lung diseaseSlowly enlarging cavities
Invasive aspergillosisProlonged neutropenia, stem cell transplantation, high-dose steroidsFever, pleuritic pain and hemoptysis; invasion of blood vessels causes infarction; a nodule with a halo of ground glass on CT; serum galactomannan; treated with voriconazole

Other opportunists

  • *Cryptococcus neoformans is an encapsulated yeast with narrow-based budding, found in pigeon droppings. Inhaled, it can cause lung nodules or pneumonia, but its main threat is meningitis in advanced HIV (CD4 below 100). It is detected with the cryptococcal antigen* test and treated with amphotericin B plus flucytosine, then fluconazole.
  • Mucormycosis, from Mucor or Rhizopus, has broad, ribbon-like hyphae without septa that branch at right angles. It strikes people with diabetic ketoacidosis, neutropenia or iron overload, causing rhinocerebral disease (a black, dead eschar on the palate or nose that spreads to the orbit and brain) or lung disease. Treatment is surgical debridement plus amphotericin B.
  • *Candida often colonizes the airways, but true Candida* pneumonia is rare; in sputum it is usually a contaminant.

Common confusions

  • Caseating versus noncaseating granulomas: tuberculosis and fungi versus sarcoidosis, berylliosis and Crohn disease.
  • Histoplasma versus Blastomyces versus Cryptococcus versus Coccidioides: tiny and inside macrophages; large with a broad-based bud; capsule with a narrow-based bud; spherules rather than yeasts.
  • Aspergillus versus Mucor: thin, septate and acute-angled versus broad, nonseptate and right-angled.
  • Pneumocystis versus bacterial pneumonia in HIV: weeks of dry cough with diffuse ground glass versus abrupt lobar consolidation.

References

  1. Kumar V, Abbas AK, Aster JC. Robbins & Cotran Pathologic Basis of Disease. 10th ed. Elsevier; 2021. ↩
  2. Keane J, Gershon S, Wise RP, et al. Tuberculosis associated with infliximab, a tumor necrosis factor α–neutralizing agent. N Engl J Med. 2001;345(15):1098-1104. doi:10.1056/NEJMoa011110 Link ↩
  3. Nahid P, Dorman SE, Alipanah N, et al. Official American Thoracic Society/Centers for Disease Control and Prevention/Infectious Diseases Society of America clinical practice guidelines: treatment of drug-susceptible tuberculosis. Clin Infect Dis. 2016;63(7):e147-e195. doi:10.1093/cid/ciw376 Link ↩
  4. Vanderah TW, ed. Katzung's Basic and Clinical Pharmacology. 16th ed. McGraw Hill; 2024. ↩
  5. Sterling TR, Njie G, Zenner D, et al. Guidelines for the treatment of latent tuberculosis infection: recommendations from the National Tuberculosis Controllers Association and CDC, 2020. MMWR Recomm Rep. 2020;69(1):1-11. doi:10.15585/mmwr.rr6901a1 Link ↩
  6. Patterson TF, Thompson GR III, Denning DW, et al. Practice guidelines for the diagnosis and management of aspergillosis: 2016 update by the Infectious Diseases Society of America. Clin Infect Dis. 2016;63(4):e1-e60. doi:10.1093/cid/ciw326 Link ↩

Test yourself in the Question Bank · Listen to the podcasts