Marks & Spencer has begun legal action against Aldi, arguing the supermarket's Cuthbert the Caterpillar cake infringes its Colin the Caterpillar trademark.
M&S claims that their similarity leads consumers to believe they are of the same standard and "rides on the coat-tails" of M&S's reputation.
It lodged an intellectual property claim with the High Court this week.
M&S wants Aldi to remove the product from sale and agree not to sell anything similar in the future.
The retailer has three trademarks relating to Colin, which it believes means Colin has acquired and retains an enhanced distinctive character and reputation.
The product was launched around 30 years ago. Colin's appearance has been substantially unchanged since around 2004, except for adaptations for events such as Halloween and Christmas, and related products such as Connie the Caterpillar.
A spokesman said: "Because we know the M&S brand is special to our customers and they expect only the very best from us, love and care goes into every M&S product on our shelves.
"So we want to protect Colin, Connie and our reputation for freshness, quality, innovation and value."
Colin is central to M&S's partnership with cancer charity Macmillan, and the retailer has created a Colin product for the annual World's Biggest Coffee Morning fundraising event.
The cake is a sponge with milk chocolate and buttercream, topped with chocolate sweets and a smiling white chocolate face.
M&S was the first retailer to sell a caterpillar cake, but many supermarkets have since created their own similar products.
Other cakes include Waitrose's Cecil, Sainsbury's Wiggles, Tesco's Curly, and Asda's Clyde the Caterpillar.
Other trademark cases over food
- In 2018, Nestle lost its battle to trademark the four-finger shape of a Kit Kat, which it had been trying to do for more than a decade
- Toblerone's shape was registered in 1998, but in 2017 it faced a dispute with Poundland - which designed a version with two rows of triangular bumps - that was settled out of court
- Swiss chocolate maker Lindt & Spruengli defeated a legal challenge in 2015 from rival confectioner Haribo, which sought to stop it making its gold chocolate bears