Insects are intermediary hosts for a number parasites including tapeworm. For example grain beetles are an intermediary host for a type of rodent tapeworm. Although humans may not be the definitive host for these parasites, humans (aberrant host) can and do occasionally become infected by these parasites. I would cook all insects prior to consumption.
Pete