There are several species of insects infesting stored grains such as confused flour beetle, Indian meal moth, lesser grain borer, and red flour beetle.
From the orlandosentinel.com
Weevil larvae are creatures that, after feeding on grain products, spin a cocoon from which emerges a moth.
From the kentucky.com
Grease moth larvae infest dried grain products and as it feeds it produces a silken substance that intertwines with the surrounding product.