Onion fly
The onion fly (maggot) feeds on lateral roots and burrows into the taproot (base) of the stem. Leaves wilt and turn bluish. Plants shrivel or die. They are also found inside developing onion bulbs causing infection by diseases like bacterial soft rot.
Attribution: Avallain