You most likely overfilled the cupcake tin! It can be so hard to not fill the cups full of batter, but if you do, they will overflow in the oven! Filling the tin to 2/3 full in each cupcake cavity is the most I would do.