There is little bacterial danger present in uncooked pasta if it has been properly stored and handled. However, cooking pasta breaks down starches, making it easier to digest.
One danger commonly associated with uncooked pasta is salmonella poisoning, as many pastas like egg noodles are made with raw egg. However, even if salmonella was present in the raw egg at the time the pasta was made, it was killed during the drying process. Bacteria cannot survive without water.
However, any raw food poses the potential risk of bacterial contamination if it has been improperly stored or been exposed to a kitchen surface that has recently harbored bacteria, such as a countertop on which raw chicken has been prepared. Boiling is one way to ensure harmful bacteria has been eliminated.
Proper storage is crucial to keeping dried pasta fresh and safe to eat. It should be kept in airtight containers in the pantry, away from moisture, humidity and extreme temperatures. Under optimal conditions, dried pasta will stay good for years, even one to two years past its printed "sell by" date.
Another factor to consider when eating raw pasta is the starch it contains. Cooking starches make them more digestible, so there is reason to believe that eating large amounts of uncooked pasta is harmful to the digestive system. However, there is evidence that overcooking pasta is harmful as well, and it can spike blood sugar. Slightly undercooking pasta to an "al dente" texture, gives it a lower glycemic index.