My roomate and I recently opened up a chocolate bar only to find a fat worm/maggot had eaten a hole right through the bar. The chocolate was in a box full of more chocolate bars that are maybe a year old. We were totally disgusted, and when we opened up the remaining bars, we found a few more that also had the worms. The worms had eaten holes right in the chocolate and on some, they seemed to shave the top of the bars off – there was chocolate shavings on the surface. Some of the worms looked like they had spiny tails, but it was hard to tell for the others whether they also had the spines. Do you know what kind of worms are these? And how did they get into our chocolate??
Pantry beetles are known to infest chocolate. The immature beetles are wormlike grubs, much as you describe.