Does cookie dough go bad if it sits out all night?

Yes, cookie dough left out overnight will likely go bad. Here's why:

* Bacteria Growth: Bacteria thrives in warm, moist environments like unrefrigerated cookie dough. This can cause food poisoning.

* Spoilage: The fat and sugar in cookie dough are prone to oxidation, making it taste rancid and unpleasant.

* Texture Changes: The dough can dry out and become crumbly, making it difficult to work with.

It's best to always refrigerate cookie dough within 2 hours of making it. If you plan to eat the dough raw, be extra cautious and avoid using raw eggs or flour.

Exceptions:

* Cooked Cookie Dough: If you're eating pre-baked cookie dough (often found in stores), it's safe to leave it out for a short time, but it's still best to refrigerate it.

* Chilling Dough for Texture: Some cookie recipes call for chilling the dough for a certain amount of time. This is to help the dough firm up for easier handling and prevents cookies from spreading too much.

In general, it's safer to err on the side of caution and refrigerate your cookie dough. If you're ever unsure, it's always best to throw it out and make a fresh batch.