Animals can pick up salmonella from contaminated food, or the bacteria can live naturally in their intestines. Some can even pick up the bacteria from their mothers before they are born, according to the C.D.C.’s website.

Although pet hedgehogs may not show signs of sickness, they can carry the bacteria and spread it through their droppings. Once the hedgehog passes the germs to their surroundings — like their toys and beddings — humans are vulnerable to infection when they handle those objects.

This is not the first time pet hedgehogs have been linked to a salmonella outbreak. From December 2011 to April 2013, 26 people were infected with the same bacterial strain, Salmonella typhimurium; a majority of them reported contact with hedgehogs. One person died and eight people were hospitalized in that outbreak, the C.D.C. reported.

“The fact that hedgehogs are a risk is not new,” said Jane Sykes, a professor of small animal internal medicine at the University of California, Davis. “But we don’t know how common the shedding of salmonella is among hedgehogs specifically.”

Scientists also are not sure exactly why hedgehogs seem to be more prone to transmitting salmonella than other animals are, Dr. Sykes said. For people with compromised immune systems, she recommends choosing a pet that poses a lower risk, like a dog.