Various factors cause earwax to develop a bad odor, including a change in the chemical composition, excessive cleaning of the outer ear that interferes with the body's natural cleaning mechanism and the indication of the presence of infections, tumors and cholesteatoma, according to the Gallo Institute of Health and Nutrition. The ceruminous and sebaceous glands of the outer ear are responsible for secreting liquids that protect and clean the ears. These liquids eventually harden to form a consistency called earwax.
The most common cause of foul-smelling earwax is generally a sign of an infection. Most ear infections are bacterial infections, although fungal infections do occur. If the odor is a result of an infection, discharge will be present. Fungal infections create a discharge that is more liquid and less pronounced, while discharge from bacterial infections is typically white and odorless in the beginning, but eventually becomes green and smelly. People should seek medical attention immediately when the discharge goes from green to yellow, as the body may not have sufficient resources to fight off the infection.
Regardless of the cause, it is recommended to seek medical attention for foul-smelling earwax if it is consistent and persistent, as it is an indication of an underlying problem that needs to be addressed.