Could be book mites. They get in flour and then everywhere. Clean out your cupboards completely, check all open food bags (pasta, flour, sugar etc) and throw out any contaminated ones. Then buy some nice plastic sealable containers for any contaminated products, and make sure you use them!