Health officials are warning consumers to avoid prepackaged caramel apples because they are linked to four deaths and more than two dozen illnesses in 10 states.

Caramel apples are most popular around Halloween, and the outbreak started just before then, in mid-October. But the commercially produced variety can have a shelf life of a month or more, and some may still be on store shelves.

The Centers for Disease Control and Prevention said it knows of 28 cases in which people were sickened with the same strains of the bacterial illness listeria, and at least 26 were hospitalized. Of those, five died. Listeriosis contributed to four of the deaths; a fifth person who died had a strain of listeria linked to the caramel apples, but health officials do not think listeriosis caused that person's death.

The agency said that 83 percent of the ill people who were interviewed reported eating commercially produced, prepackaged caramel apples before getting sick.

The CDC said the investigation into the deaths and illnesses is "rapidly evolving." Christopher Braden, an epidemiologist at the CDC, said the agency is still trying to determine which brands are involved and how caramel apples may have become infected. He said there is no reason at this point to stop eating apples or other caramel products.

Listeria is a foodborne illness that is especially dangerous to pregnant women, newborn babies, the elderly and those with compromised immune systems. It rarely causes serious illness in healthy people and can be treated with antibiotics. Symptoms include fever, muscle aches, nausea and diarrhea.

Because it can be so serious for some people, outbreaks of listeria generally cause more deaths than other pathogens such as salmonella or E. coli. An outbreak of listeria linked to Colorado cantaloupe in 2011 caused 33 deaths.

The CDC said that the outbreak linked to the caramel apples began Oct. 17 and the last known illnesses started Nov. 27. The agency said illnesses that have occurred since early December may not have been reported yet. Those sickened ranged from seven to 92 years old, with a median age of 64 years.

Nine of the illnesses involved either a pregnant woman or an infant, the CDC said.

Unusually, three cases of meningitis linked to the listeria were also reported in older children, the agency said. Those three children were not among the deaths, Braden said, but the CDC is "very concerned" that those cases occurred in otherwise healthy children. While listeria sometimes infects newborns, "usually we would not see this kind of infection in healthy older children," Braden said.

Braden said there may have been more illnesses in children because kids are more likely to eat caramel apples, or possibly because the apples were heavily contaminated.

Two of the deaths were in Minnesota, one was in Texas and one was in California, the CDC said. The agency said illnesses also occurred in Arizona, California, Missouri, New Mexico, North Carolina, Texas, Utah, Washington, and Wisconsin. Missouri and New Mexico had the most illnesses, with five each.

Braden said anyone with commercially produced, prepackaged caramel apples at home should throw them away, taking care to wrap them up well so animals or people going through trash don't eat them.