Q.Can Tuber (potato) Worms Hurt People?
There were tuber worms in my potatoes in my kitchen, and we didn’t know it.
Certified GKH Gardening Expert
I researched this but couldn't find anything about whether or not it caused harm to humans. If the potatoes were eaten, they would have been cooked so probably OK. However, their tunnels allow fungi, bacteria, etc., to grow, causing disease to the potatoes. Plus, the tuberworm excrement can be inside the tunnels. We all know we consume a certain amount of insects every year in our cereal and pantry foods, and that poses no problem, but worms seem a bit more iffy. I would call your doctor's office and speak with the nurse, just to put your mind at ease.
https://entnemdept.ufl.edu/creatures/veg/potato/potato_tuberworm.htm