Yes, if the compost pile is well managed (turned), the internal temperatures (150-160 degrees F) should be high enough to kill the worms. Put any identifiable worms or webs in the middle of pile. If you can not manage your compost pile to attain the necessary internal temperature, put the infested leaves out for trash pickup.
