Medicines used to treat pinworm infection include mebendazole and pyrantel pamoate. These are the most useful medicines for treating pinworm infection.