Raw Potatoes are pretty safe to eat however Raw Potatoes do contain A high concentration of alkaloids, which are broken down during the cooking process.
Other than that Raw Potatoes are not going to harm your health or give you worms.
There's no way for the Raw Potato to give you worms but they can contain bacteria that is killed off when cooked.