mug cakes can overflow, aka explode for a few reasons. first, do not overfill your mug with cake batter. second, if you use a really tall narrow mug, the heat from the outside into the center pushes the batter up as it cooks.