Lung cavity
A lung cavity or pulmonary cavity is an abnormal, thick-walled, air-filled space within the lung. Cavities in the lung can be caused by infections, cancer, autoimmune conditions, trauma, congenital defects, or pulmonary embolism. The most common cause of a single lung cavity is lung cancer. Bacterial, mycobacterial, and fungal infections are common causes of lung cavities. Globally, tuberculosis is likely the most common infectious cause of lung cavities. Less commonly, parasitic infections can cause cavities. Viral infections almost never cause cavities.  The terms cavity and cyst are frequently used interchangeably; however, a cavity is thick walled (at least 5 mm), while a cyst is thin walled (4 mm or less). The distinction is important because cystic lesions are unlikely to be cancer, while cavitary lesions are often caused by cancer.Diagnosis of a lung cavity is made with a chest X-ray or CT scan of the chest, which helps to exclude mimics like lung cysts, emphysema, bullae, and cystic bronchiectasis. Once an imaging diagnosis has been made, a person’s symptoms can be used to further narrow the differential diagnosis. For example, recent onset of fever and productive cough suggest an infection, while a chronic cough, fatigue, and unintentional weight loss suggest cancer or tuberculosis. Symptoms of a lung cavity due to infection can include fever, chills, and cough. Knowing how long someone has had symptoms for or how long a cavity has been present on imaging can also help to narrow down the diagnosis. If symptoms or imaging findings have been present for less than three months, the cause is most likely an acute infection; if they have been present for more than three months, the cause is most likely a chronic infection, cancer, or an autoimmune disease.The presence of lung cavities is associated with worse outcomes in lung cancer and tuberculosis; however, if a lung cancer develops cavitation after chemotherapy and radiofrequency ablation, that indicates a good response to treatment.

Formal definition
In the 2008 Fleischner Society "Glossary of Terms for Thoracic Imaging", a cavity is radiographically defined as “a gas-filled space, seen as a lucency or low-attenuation area, within [a] pulmonary consolidation, a mass, or a nodule”. Pathologically, a cavity is “usually produced by the expulsion or drainage of a necrotic part of the lesion via the bronchial tree.”

Lung cavity mimics
The first step in evaluating a suspected lung cavity lesion is to exclude other kinds of abnormal air-filled spaces in the lung, including lung cysts, emphysema, bullae, and cystic bronchiectasis. Lung cysts are the most common mimics of lung cavities. Cavities and cysts are similar in that they are both abnormal, air-containing spaces with clearly defined walls. The difference between cavities and cysts is that cavities are thick walled, while cysts are thin walled. Generally, cavities have walls that are at least 5 mm thick, while cysts have walls that are 4 mm or less, and often less than 2 mm.The distinction between cysts and cavities is important because the thicker the wall is, the more likely it is to be cancer. Thus, cystic lesions are unlikely to be cancer, while cavitary lesions are often caused by cancer. In a study from 1980 that used chest X-rays to evaluate 65 cases of solitary lung cavities, 0% percent of cavities with walls 1 mm or less were malignant (that is, cancerous), versus 8% of cavities with walls 4 mm or less, 49% of cavities with walls 5 to 15 mm, and 95% of cavities with walls 15 mm or greater.  However, a 2007 study that used CT to evaluate lung cavities showed no relationship between wall thickness and the likelihood of malignancy. It did show that malignant cavities are more likely than benign cavities to have an irregular internal wall (49% vs 26%) and have an indentation of the outer wall of the cavity (54% vs 29%).Areas of emphysema are abnormal, air-filled spaces that usually do not have visible walls, and bullae are very thin walled (<1 mm). Cystic bronchiectasis is irreversible bronchial dilation, which is permanent widening of the bronchioles (small airways) in the lung. It can be distinguished on imaging by a lack of bronchial tapering, meaning that the bronchioles do not get narrower as they travel further into the lung. Cystic bronchiectasis is also associated with an increased bronchoarterial ratio, meaning that the bronchioles are larger than the blood vessels that run alongside them.

Infectious causes
Bacterial, mycobacterial, and fungal infections are common causes of lung cavities. Globally, tuberculosis is likely the most common infectious cause of lung cavities. Less commonly, parasitic infections can cause cavities. Viral infections almost never cause lung cavities; in a small study of immunocompromised patients with a lung infection, the presence of a cavity on CT scan essentially ruled out viral infection. In the same study, about one-third of the cavities were caused by a bacterial infection, another third were caused by a mycobacterial infection, and another third were caused by a fungal infection.

Bacterial
Bacteria can cause lung cavities in one of two ways; they can either enter the lung through the trachea (windpipe), or they can enter through the bloodstream as septic pulmonary emboli (infected blood clots). Community-acquired pneumonia is an uncommon cause of lung cavities, but cavitary pneumonia is occasionally seen with Streptococcus pneumoniae or Haemophilus influenzae infection. However, since these two species of bacteria are such common causes of pneumonia, they may cause a significant fraction of all cavitary pneumonias. The most common bacterial causes of lung cavities are Streptococcus species and Klebsiella pneumoniae. Less commonly, the bacteria Staphylococcus aureus, Pseudomonas aeruginosa, Acinetobacter, Escherichia coli, and Legionella can cause cavitation.  Nocardia is a bacterium that can cause pulmonary nocardiosis and lung cavities in people who are immunocompromised (have weak immune systems), including organ transplant recipients who are on immunosuppressants, and those with AIDS, lymphoma, or leukemia. Melioidosis, caused by the bacteria Burkholderia pseudomallei, is common in tropical areas, especially Southeast Asia, and is frequently associated with lung cavities.Pneumonia can lead to the development of a lung abscess, which is a pus-containing necrotic lesion of the lung parenchyma (lung tissue). On CT scan of the chest, a lung abscess appears as an intermediate- or thick-walled cavity with or without an air-fluid level (a flat line separating the air in the cavity from the fluid). An abscess can occur anywhere in the lung. Risk factors for polymicrobial lung abscesses (abscesses caused by multiple species of bacteria) include alcoholism, a history of aspiration (food or water accidentally going down the trachea), poor dentition (bad teeth), older age, diabetes mellitus, drug abuse, and artificial ventilation. Polymicrobial lung abscesses are usually due to aspiration and are located in the posterior segments of the upper lobes or superior segments of the lower lobes.  Klebsiella pneumoniae is a common cause of lung abscesses and is usually monomicrobial (caused by a single species of bacteria). Risk factors include diabetes and chronic lung disease. A lung abscess due to Klebsiella can progress to massive pulmonary gangrene, a rare condition in which an entire section of the lung is completely destroyed. Half of all cases of pulmonary gangrene are caused by Klebsiella. Imaging in pulmonary gangrene shows multiple small cavities joining together to form a large cavity.

Mycobacterial
Mycobacteria that can cause cavitations include Mycobacterium tuberculosis and nontuberculous mycobacteria, most commonly Mycobacterium avium complex. Primary tuberculosis is caused by the initial infection with Mycobacterium tuberculosis and rarely results in the formation of lung cavities. 90% of people with primary tuberculosis are able to contain the infection and enter a latent phase. Reactivation tuberculosis, which is caused by the reactivation of latent tuberculosis, results in lung cavities visible on X-ray 30 to 50% of the time. There are frequently multiple cavities, and they most commonly occur in the apical and posterior segments of the upper lobes or the superior segment of the lower lobes.  Cavitary tuberculosis is associated with worse outcomes, a higher rate of treatment failure, more frequent relapse after treatment, and a higher risk of transmitting the disease to others. Even after successful treatment with anti-tuberculosis drugs, 20-50% of patients with cavitary tuberculosis have persistent cavities, which results in decreased lung function and increased risk of opportunistic infections by Aspergillus fumigatus and other fungal pathogens.Nontuberculous mycobacteria (NTM) are all mycobacterial species other than Mycobacteria tuberculosis (which causes tuberculosis) and Mycobacterium leprae (which causes leprosy). NTM are found everywhere in the environment but are most commonly found in soil and water. Lung disease is caused by inhaling or ingesting nontuberculous mycobacteria. Unlike tuberculosis, NTM infection is not transmitted from person to person. Although NTM lung infections can cause lung cavities, the most common finding on imaging is bronchiectasis, which may occur with or without cavities. Mycobacterium avium complex (MAC) is the most common cause of NTM lung disease in most countries, including the United States. Classically, MAC infection results in either upper lobe cavities in male smokers with COPD or bronchiectasis in thin, older women; however, it is possible to have both cavities and bronchiectasis in the same patient. Similar to tuberculosis, the presence of cavities in MAC infection is associated with worse outcomes. Mycobacterium kansasii, Mycobacterium xenopi, and the rapidly-growing Mycobacterium abscessus have also been associated with lung cavities.

Fungal
Fungal infections that can cause cavitations include histoplasmosis, coccidiomycosis, cryptococcosis, and aspergillosis. Aspergillosis, most commonly caused by Aspergillus fumigatus, can present in four different ways (listed in order of increasing severity): aspergilloma, allergic bronchopulmonary aspergillosis (ABPA), chronic necrotizing aspergillosis, and invasive aspergillosis. All of these are associated with lung cavities except for ABPA, which is a hypersensitivity response associated with bronchiectasis on imaging. An aspergilloma is an infection of a pre-existing lung cavity by Aspergillus species without tissue invasion and results in the formation of a fungal ball. Historically, tuberculosis was the most common cause of the lung cavity (and still is in areas where tuberculosis is endemic); however, the cavity can also be caused by sarcoidosis, bullae, bronchiectasis, or cystic lung disease. Chronic necrotizing aspergillosis and invasive aspergillosis are usually seen in immunocompromised people. Risk factors for chronic necrotizing aspergillosis include advanced age, alcoholism, diabetes, and mild immunosuppression. Invasive pulmonary aspergillosis is mainly seen in severely immunocompromised people, especially those with hematological malignancies (cancers of the blood), bone marrow transplant recipients, and people on long-term corticosteroid therapy, such as prednisone. Allogeneic bone marrow transplant recipients have the highest risk of getting invasive aspergillosis. Lung transplant recipients are also at high risk.

Parasitic
Parasitic infections associated with cavitations include echinococcosis and paragonimiasis. Echinococcus is a tapeworm that most commonly infects dogs; people become infected by ingesting food or water that contains Echinococcus eggs. This results in cysts forming in the body, most commonly in the liver, but lung involvement is seen in 10-30% of cases. The cysts in the lung sometimes look like cavities on imaging. Paragonimus westermani, also called the lung fluke, is a flatworm which is transmitted by eating freshwater crabs or crayfish containing metacercaria (the infective form of the tapeworm). They mature into adult lung flukes in the lung, where cavitations may be seen in 15-59% of cases. Paragonimiasis is common in East Asia and Southeast Asia.

Noninfectious causes
Lung cancer
The most common cause of a single lung cavity is lung cancer. Usually, the cavity forms because the cancer grows more rapidly then its blood supply, resulting in necrosis (cell death) in the central part of the cancer. 81% of lung cancers that develop cavities over-express epidermal growth factor receptor (EGFR), which could be related to rapid growth, central necrosis, and cavity formation. 11% of primary lung cancers (cancers that start in the lung) have cavities that can be seen on chest X-ray; 22% of primary lung cancers will have cavities on CT, which is more sensitive. Squamous-cell carcinoma of the lung is more likely to develop cavitations than lung adenocarcinoma or large-cell lung carcinoma. Other primary cancers of the lung, such as lymphoma and Kaposi’s sarcoma, can also cavitate, especially in people with AIDS. Lung cancers that develop cavities are associated with a poor prognosis (worse outcomes). Cancers that metastasize (spread) to the lung can also develop cavitations, but this is only seen about 4% of the time on X-ray. Metastatic cancers of squamous cell origin are also more likely to cavitate than cancers of other origins. Both chemotherapy (drugs to treat cancer) and radiofrequency ablation (destroying cancer with radio waves) can cause lung cancers to develop cavities, which is a sign of a good response to treatment. It is possible to have both an infection and lung cancer in the same cavity; the most common combination is primary lung cancer and tuberculosis.

Autoimmune
Autoimmune causes of lung cavities include granulomatosis with polyangiitis, rheumatoid arthritis, and rarely necrotizing sarcoidosis (less than 1% of people with sarcoidosis develop lung cavities). Ankylosing spondylitis, eosinophilic granulomatosis with polyangiitis, and systemic lupus erythematous rarely cause lung cavities.

Pulmonary embolism and septic emboli
Pulmonary embolism (a blood clot in the lung) causes pulmonary infarction (the death of lung tissue) less than 15% of the time, and only about 5% of pulmonary infarctions result in lung cavities. Septic pulmonary emboli (infected blood clots) are collections of infectious organisms, fibrin, and platelets that travel through the blood to the lung and cause small areas of pulmonary infarction by blocking off blood flow. This results in multiple small cavities 85% of the time. Symptoms can include cough, dyspnea (shortness of breath), chest pain, hemoptysis (coughing up blood) and sinus tachycardia (a fast heart rate). Risk factors for septic pulmonary emboli include IV drug use, implanted prosthetic devices (like central lines, pacemakers, and right-sided heart valves), and septic thrombophlebitis (a blood clot in a vein due to infection). Two forms of septic thrombophlebitis include pelvic thrombophlebitis and Lemierres syndrome (septic thrombophlebitis of the internal jugular vein).

Trauma
Pulmonary contusion (lung bruise) from blunt chest trauma causes bleeding into the alveoli (air sacs) and can cause small cavities to form that are called traumatic pulmonary pseudocysts (TPP). This is rare, as less than 3% of lung injuries lead to TPP. It can occur at any age, but is more common in children and adults under the age of 30. Although it can occur anywhere in the lung, it is most common in the lower lobes. TPP usually resolves on its own within four weeks.

Congenital
Congenital lung cavities, or lung cavities present at birth, include bronchogenic cysts, congenital pulmonary airway malformation, and pulmonary sequestration. These congenital lesions are the most common cause of lung cavities in infants, children, and young adults. Bronchogenic cysts are due to abnormal budding of the bronchial tree. About 70% are found in the mediastinum, which is the central part of the chest where the heart is. Another 15 to 20% are intrapulmonary (within the lung), usually in the lower lobes. Congenital pulmonary airway malformation, formerly called congenital cystic adenomatoid malformation, is a benign tumor the results in the formation of single or multiple cysts. Pulmonary sequestration refers to abnormal lung tissue that gets its blood supply from the systemic circulation instead of the pulmonary circulation, like the rest of the lung. This lung tissue is also not connected to the trachea.

See also
Focal lung pneumatosis, article comparing lung blebs, bullae, cysts, and cavities


== References ==