A cupcake was a traditional Earth pastry. It was also a term used as an insult.
In the alternate reality of 2255, James T. Kirk insulted a Starfleet cadet in an Iowa bar by calling him "Cupcake." Three years later, the same man (then a security officer on the USS Enterprise), referred to Kirk by the same insult while arresting Kirk and Montgomery Scott after they had "mysteriously" come aboard the ship. (Star Trek)