Pinworms are typically acquired by swallowing their tiny eggs. The infection spreads mainly through direct hand-to-mouth transfer after touching contaminated areas around the anus or objects like bedding, clothing, toys, and surfaces that have pinworm eggs on them. These eggs can survive for 2 to 3 weeks on surfaces. In some cases, eggs can become airborne and be inhaled but this is rare. Children, especially those in schools or daycare, and household members of infected persons are most at risk because the eggs often get transferred from scratching the itchy anal area and then touching the mouth or other objects, continuing the cycle of infection.