Eating raw or undercooked meats. The main risk factor for tapeworm infection is eating raw or undercooked meat and fish. Dried and smoked fish also may have larval cysts in them.