If you're often tempted to scoop raw cookie dough from the bowl before it's baked, you might want to think again – new research says dry flour can harbour some very nasty bacteria, and even bring on E. coli infections.

The new study investigated 56 such cases of a particular type of E. coli-related infection that occurred in the US between December 2015 and September 2016, determining that the common link was eating raw batter or dough while baking.

Thankfully no one died from the incidents, but the team of researchers says dry flour is a better habitat for bacteria than we previously thought. At the time, the outbreak of illnesses prompted the recall of some 10 million pounds of flour by the US Centers for Disease Control and Prevention (CDC).

"We're not trying to ruin people's holidays but we want them to be aware of the risks," lead researcher Samuel J. Crowe from the CDC told Jan Hoffman at The New York Times.

"The bacteria is not uniformly distributed in a two-and-a-half pound bag of flour. A small amount could get you really sick. I've had E. coli and salmonella and it's pretty darn unpleasant."

The type of E. coli bacteria identified by the researchers usually lurks in places like hamburger meat and leafy vegetables, so it was a surprise to find it in a foodstuff that's so dry.

It was only after extensively questioning the people who fell ill that the root cause of the problem started to become clear.

Eventually the researchers were able to track down the source of the bacteria to one flour facility in Kansas City, Missouri. No contamination was discovered at the factory, so the bacteria had to have made its home in the flour earlier, most likely through cattle or deer droppings in the original wheat fields.

And that means the same bacteria could be found in dry flour from just about anywhere, so you really don't want to be taking any chances when baking. One of the people affected developed a severe form of kidney failure, called haemolytic-uraemic syndrome, before pulling through.

"It's a new view of flour," Marguerite A. Neill from Brown University Medical School in Rhode Island, who wasn't involved in the study, told The New York Times.

High, sustained cooking heat kills off the pathogens, Neill says, but she advises people to avoid tasting uncooked flour dishes, and to wash their hands in hot, soapy water after handling flour, even if they're just dusting a rolling pin.

Allowing children to play with raw dough and using flour to make playdough for children are also big no-nos in light of the new research. You can read the advisory that the US Food and Drug Administration put out last year here.

There is one bit of good news: commercial cookie dough, like that found in cookie dough ice cream and packaged, refrigerated cookie dough, is safe to nibble on, as this has been pasteurised and heat-treated ever since an outbreak of illness in 2009.

"It would have seemed incredible that this dry, powdery substance, stored on a shelf for months, could have a live micro-organism that didn't spoil the flour but still could make someone sick," says Neill.

The research has been published in The New England Journal of Medicine.