Despite the risk of drying out, refrigeration is recommended for some types of cupcakes with frosting and fillings to keep them safe to eat. Cupcakes with frostings or fillings that include ingredients like cream cheese, whipped cream, or custard can make you sick if left out at room temperature for too long.