It is unlikely for raw pasta to be contaminated with parasites, such as tapeworms, according to the United States Department of Agriculture. Parasites are typically transmitted to the host through raw or undercooked foods and water and contaminated soil.
For the pasta to become infected with parasites, it would have to of come into contact with another substance or raw food; tapeworms eggs are most commonly found in pork and beef.
With proper cooking methods and hygienic practices, the spread of these parasites is very improbable. When meats reach high internal temperatures, the eggs are destroyed and the meat becomes safe to eat.