Can you eat raw cookie dough? What to know amid a new recall and salmonella concerns.

What experts want you to know about raw cookie dough.
What experts want you to know about raw cookie dough. (Getty Creative)

For a lot of folks, the best part of baking cookies is licking the spoon afterward. But cookie dough — delicious though it may be — also comes with a lot of warnings about foodborne illnesses on account of the raw egg and flour it typically (but not always) contains. Case in point: The Food & Drug Administration announced just this week that nearly 30,000 cases of cookie dough were recalled across 21 states due to potential salmonella contamination.

While you certainly want to avoid the recalled products (which include brands like Panera and Costco), the recall may make you wonder if all cookie dough is unsafe to eat. Here’s what experts want you to know.

If it contains flour and raw eggs, then yes. Both are ingredients that may contain salmonella bacteria, leading to risk of foodborne illness. Raw flour may also be contaminated with E. coli, another bacteria that can cause foodborne illness.

“The expectation by food manufacturers is that the consumer will bake the cookie dough, ensuring the salmonella has been killed and the cookies rendered safe,” food scientist Bryan Quoc Le tells Yahoo Life. He notes, however, that if there are too many salmonella bacteria cells, even baking cookies may not be enough to eliminate all risk — hence the recent recall of cookie dough.

Food safety expert Darin Detwiler tells Yahoo Life that the risks of foodborne illness are greater with vulnerable populations. This includes people who are pregnant, the elderly, young children and the immunocompromised, who can all have significantly worse outcomes from salmonella or E. coli contamination than people with healthy, functioning immune systems.

Typical symptoms of salmonella include diarrhea, fever and abdominal cramps. If it spreads to your bloodstream (a condition called bacteremia) it can also lead to infections throughout the rest of your body. Symptoms of E. coli include diarrhea (which can be bloody), abdominal cramps and nausea, with the most severe cases potentially leading to kidney failure.

Good news: There are brands of store-bought cookie dough that are safe to eat. According to Detwiler, these products are typically labeled as "edible cookie dough" and ensure safety by heat treating the flour (to kill any potential E. coli bacteria) and using pasteurized eggs, which have been treated to eliminate salmonella.

Alternatively, these products may skip the eggs entirely. (Granola butter brand Oat Haus also sells cookie dough-flavored granola butter, which you can dress up with your own chocolate chips or other toppings for an extra dose of sweetness.)

While it is possible to purchase pasteurized eggs in the grocery store, Le doesn’t recommend trying to make edible cookie dough at home with flour, because of how difficult it can be to properly heat treat flour. “Certain strains of salmonella are very heat-resistant in flour,” he cautions.