If it is going to be cooked and eaten, it’s fine. Bacteria in the raw cookie dough will not multiply, but can remain for some time.
Bakery or homemade cookies can be stored at room temperature two to three weeks or two months in the refrigerator. Cookies retain their quality when stored in the freezer for eight to 12 months. Moist bars, such as cheesecake and lemon bars, can be refrigerated for seven days.17 July 2019
Of course, all foods last for a shorter period of time if they are not stored properly. Remember that cookies, like a lot of other sweets, usually have a best by date and not an expiration date. Because of this distinction, you may safely use them to satisfy your sweet tooth even after the best before date has lapsed.21 Apr 2015
Baked cookies should not be refrigerated.17 Nov 2008
Yes, cookies do go bad and if you eat them, they could give you food poisoning. Always check cookies to see if they are past the “best by eaten date” to make sure they are not moldy or don’t have a weird smell.9 Jan 2021
Unless otherwise noted, don’t store cookies in the refrigerator: The cool air can rob cookies of their moisture and make them taste bland. In general, store cookies at room temperature or freeze them, as specified above.17 Dec 2016