I used to buy those little Jiffy brand corn bread mixes at 3 for a buck. One time I opened the sealed wax paper bag and found a bunch of tiny worms crawing around. I never could eat the stuff again.
Those are just common pantry moth worms. The moth lays the eggs on a surface and when they hatch the larvae can chew through the surface, whether it is wax paper, cardboard or plastic. The cornbread mix had probably been on the shelf a while in warm weather and a moth laid eggs on it, either at the store or at the house. The other boxes may have been newer or else there was only one moth loose in the place.
You can often see the very fine “sawdust” such moth larvae make at the store if you inspect bags of beans or pasta, esp. in the summer, and if they have a pet food aisle with bird seed the sunflower seed is the main culprit.
They are actually quite edible- pure protein, no noticeable flavor, and pale, but wiggly stuff in the food is disconcerting and you would never want to serve it to guests. just mix it up and cook it and give it to your dog- he will love it and you won’t waste it.
If you are squeamish about eating insects, consider that if you have ever eaten anything with red food coloring, such a soft drinks, there’s a good chance you’ve been eating the extract made from cochineal beetles. Recall the red #? listed on the label, I forget which number indicates the beetle juice.