Leaving cookie dough out overnight at room temperature is generally not recommended due to food safety concerns. Raw cookie dough contains ingredients like eggs and flour that can harbor bacteria such as Salmonella and E. coli, which can lead to foodborne illnesses if consumed.
Leaving cookie dough at room temperature for an extended period allows bacteria to multiply, increasing the risk of contamination. It's important to note that even if the dough doesn't contain eggs, flour itself can still carry harmful bacteria.
To ensure food safety, it is best to refrigerate or freeze cookie dough if you don't plan to bake it immediately. Properly refrigerated cookie dough can typically last for a few days, while frozen dough can be stored for several months.
If you accidentally left cookie dough out overnight, it's best to discard it to avoid any potential foodborne illness. It's better to prioritize food safety and avoid taking unnecessary risks. Instead, prepare a fresh batch of cookie dough when you're ready to bake.