What is wrong with coughing up thick yellow sputum?

Coughing up yellow and thick sputum needs to be considered as a result of chronic bronchitis, bronchiectasis, ruptured lung abscess or severe pneumonia, usually due to bacterial infection.
If coughing up yellow sputum with or without other discomforts such as fever, sore throat, chest pain and dyspnoea is present, prompt medical attention should be sought to identify the cause and standardise treatment.